diff options
author | Chris Baumbauer <cab@cabnetworks.net> | 2018-10-24 22:38:44 -0700 |
---|---|---|
committer | Chris Baumbauer <cab@cabnetworks.net> | 2018-10-24 22:38:44 -0700 |
commit | b5155b90ee233e2824c168fbb06b3ce5d3aeb194 (patch) | |
tree | c77d15491ce6f4d7283538d6557f581289c30ce0 /db | |
parent | 661fd213de41d06ebdbecb92f37668f0009c838d (diff) | |
download | gitlab-ce-b5155b90ee233e2824c168fbb06b3ce5d3aeb194.tar.gz |
Knative support
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180912111628_add_knative_application.rb | 42 | ||||
-rw-r--r-- | db/schema.rb | 12 |
2 files changed, 54 insertions, 0 deletions
diff --git a/db/migrate/20180912111628_add_knative_application.rb b/db/migrate/20180912111628_add_knative_application.rb new file mode 100644 index 00000000000..aa3ddf84b1c --- /dev/null +++ b/db/migrate/20180912111628_add_knative_application.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddKnativeApplication < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + # When a migration requires downtime you **must** uncomment the following + # constant and define a short and easy to understand explanation as to why the + # migration requires downtime. + # DOWNTIME_REASON = '' + + # When using the methods "add_concurrent_index", "remove_concurrent_index" or + # "add_column_with_default" you must disable the use of transactions + # as these methods can not run in an existing transaction. + # When using "add_concurrent_index" or "remove_concurrent_index" methods make sure + # that either of them is the _only_ method called in the migration, + # any other changes should go in a separate migration. + # This ensures that upon failure _only_ the index creation or removing fails + # and can be retried or reverted easily. + # + # To disable transactions uncomment the following line and remove these + # comments: + # disable_ddl_transaction! + + def change + create_table "clusters_applications_knative" do |t| + t.references :cluster, null: false, unique: true, foreign_key: { on_delete: :cascade } + + t.datetime_with_timezone "created_at", null: false + t.datetime_with_timezone "updated_at", null: false + t.integer "status", null: false + t.string "version", null: false + t.string "domainname", null: false + t.text "status_reason" + end + end +end diff --git a/db/schema.rb b/db/schema.rb index ddfccbba678..7bea6db5958 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -668,6 +668,16 @@ ActiveRecord::Schema.define(version: 20181013005024) do t.text "status_reason" end + create_table "clusters_applications_knative", force: :cascade do |t| + t.integer "cluster_id", null: false + t.datetime_with_timezone "created_at", null: false + t.datetime_with_timezone "updated_at", null: false + t.integer "status", null: false + t.string "version", null: false + t.string "domainname", null: false + t.text "status_reason" + end + create_table "clusters_applications_prometheus", force: :cascade do |t| t.integer "cluster_id", null: false t.integer "status", null: false @@ -1805,6 +1815,7 @@ ActiveRecord::Schema.define(version: 20181013005024) do end add_index "redirect_routes", ["path"], name: "index_redirect_routes_on_path", unique: true, using: :btree + add_index "redirect_routes", ["path"], name: "index_redirect_routes_on_path_text_pattern_ops", using: :btree, opclasses: {"path"=>"varchar_pattern_ops"} add_index "redirect_routes", ["source_type", "source_id"], name: "index_redirect_routes_on_source_type_and_source_id", using: :btree create_table "releases", force: :cascade do |t| @@ -2349,6 +2360,7 @@ ActiveRecord::Schema.define(version: 20181013005024) do add_foreign_key "clusters_applications_ingress", "clusters", name: "fk_753a7b41c1", on_delete: :cascade add_foreign_key "clusters_applications_jupyter", "clusters", on_delete: :cascade add_foreign_key "clusters_applications_jupyter", "oauth_applications", on_delete: :nullify + add_foreign_key "clusters_applications_knative", "clusters", on_delete: :cascade add_foreign_key "clusters_applications_prometheus", "clusters", name: "fk_557e773639", on_delete: :cascade add_foreign_key "clusters_applications_runners", "ci_runners", column: "runner_id", name: "fk_02de2ded36", on_delete: :nullify add_foreign_key "clusters_applications_runners", "clusters", on_delete: :cascade |