-
Notifications
You must be signed in to change notification settings - Fork 124
Create OpenShift Service Catalog tables #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
45b5eb1
dae30d5
72b3091
de8bb98
e3ef4d0
dff8a6a
48968bf
ff7dcd0
215fc81
0a47788
30611aa
cf315b8
bc3dcdd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| class CreateOpenshiftServiceCatalogTables < ActiveRecord::Migration[5.0] | ||
| def change | ||
| create_table :container_service_brokers, :id => :bigserial, :force => :cascade do |t| | ||
| t.string :name | ||
| t.string :kind | ||
| t.string :ems_ref | ||
| t.integer :resource_version | ||
| t.text :url | ||
|
|
||
| t.references :ems_id, :type => :bigint, :index => true, :references => :ext_management_systems | ||
| t.references :container_projects, :type => :bigint, :index => true | ||
|
|
||
| t.jsonb :extra | ||
|
|
||
| t.datetime :ems_created_on | ||
| t.timestamps | ||
| end | ||
|
|
||
| create_table :container_service_classes, :id => :bigserial, :force => :cascade do |t| | ||
| t.string :name | ||
| t.string :kind | ||
| t.string :status | ||
| t.string :ems_ref | ||
| t.integer :resource_version | ||
| t.text :description | ||
| t.boolean :bindable | ||
| t.boolean :plan_updatable | ||
|
|
||
| t.references :ems_id, :type => :bigint, :index => true, :references => :ext_management_systems | ||
| t.references :container_projects, :type => :bigint, :index => true | ||
| t.references :container_service_brokers, :type => :bigint, :index => true | ||
|
|
||
| t.jsonb :extra | ||
|
|
||
| t.datetime :ems_created_on | ||
| t.timestamps | ||
| end | ||
|
|
||
| create_table :container_service_plans, :id => :bigserial, :force => :cascade do |t| | ||
| t.string :name | ||
| t.string :kind | ||
| t.string :status | ||
| t.string :ems_ref | ||
| t.integer :resource_version | ||
| t.text :description | ||
| t.boolean :free | ||
|
|
||
| t.references :ems_id, :type => :bigint, :index => true, :references => :ext_management_systems | ||
| t.references :container_projects, :type => :bigint, :index => true | ||
| t.references :container_service_classes, :type => :bigint, :index => true | ||
|
|
||
| t.jsonb :extra | ||
|
|
||
| t.datetime :ems_created_on | ||
| t.timestamps | ||
| end | ||
|
|
||
| create_table :container_service_instances, :id => :bigserial, :force => :cascade do |t| | ||
| t.string :name | ||
| t.string :kind | ||
| t.string :status | ||
| t.string :ems_ref | ||
| t.string :secret_name | ||
| t.integer :resource_version | ||
|
|
||
| t.references :ems_id, :type => :bigint, :index => true, :references => :ext_management_systems | ||
| t.references :container_projects, :type => :bigint, :index => true | ||
| t.references :container_service_classes, :type => :bigint, :index => {:name => 'csi_on_container_service_classes'} | ||
| t.references :container_service_plans, :type => :bigint, :index => true | ||
|
|
||
| t.jsonb :parameters | ||
| t.jsonb :parameters_from | ||
| t.jsonb :extra | ||
|
|
||
| t.datetime :ems_created_on | ||
| t.timestamps | ||
| end | ||
|
|
||
| create_table :container_service_bindings, :id => :bigserial, :force => :cascade do |t| | ||
|
||
| t.string :name | ||
| t.string :kind | ||
| t.string :status | ||
| t.string :ems_ref | ||
| t.string :secret_name | ||
| t.integer :resource_version | ||
|
|
||
| t.references :ems_id, :type => :bigint, :index => true, :references => :ext_management_systems | ||
| t.references :container_projects, :type => :bigint, :index => true | ||
| t.references :container_service_instances, :type => :bigint, :index => {:name => 'csb_on_container_service_instances'} | ||
|
|
||
| t.jsonb :parameters | ||
| t.jsonb :parameters_from | ||
| t.jsonb :extra | ||
|
|
||
| t.datetime :ems_created_on | ||
| t.timestamps | ||
| end | ||
|
|
||
| create_table :container_secrets, :id => :bigserial, :force => :cascade do |t| | ||
|
||
| t.string :name | ||
| t.string :kind | ||
| t.string :ems_ref | ||
| t.integer :resource_version | ||
|
|
||
| t.references :ems_id, :type => :bigint, :index => true, :references => :ext_management_systems | ||
| t.references :container_projects, :type => :bigint, :index => true | ||
|
|
||
| t.jsonb :extra | ||
|
|
||
| t.datetime :ems_created_on | ||
| t.timestamps | ||
| end | ||
| end | ||
| end | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ladas Would the extra column contain the status information about a service which is a nested hash. Here is an example of a failed service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea we can put it to extra or do separate jsob column for it. The extra is for whatever else we need and we do not have column for (for start, we won't be able to order and search using the stuff in jsonb, since we don't have that coded in)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@syncrou @mkanoor but given the big amount of hash data, it would be nice if you guys would tell me what we actually need. So we don't bloat our DB with data we are not using for anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ladas - At this time I'm not fully sure if we know 100% what we need. I'm not opposed to jamming the full hash into the extra column for now so we have it, with the understanding that we'll adjust it and add columns once we're set on what we need. @mkanoor Thoughts?