diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-05-31 17:01:33 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-05-31 17:01:33 +0300 |
commit | 0b2ca23b9c82bfc728d6ab386ca93ecd51bafcaa (patch) | |
tree | af261523b53fbff148aa165ab548611b3ff0668e /db | |
parent | 22866a28a5f27b2a41be99799aaa85fa4098fba1 (diff) | |
download | gitlab-ce-0b2ca23b9c82bfc728d6ab386ca93ecd51bafcaa.tar.gz |
Improve jupyter app db migrations
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180511131058_create_clusters_applications_jupyter.rb | 6 | ||||
-rw-r--r-- | db/schema.rb | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/db/migrate/20180511131058_create_clusters_applications_jupyter.rb b/db/migrate/20180511131058_create_clusters_applications_jupyter.rb index 91210f0caa6..f3923884e37 100644 --- a/db/migrate/20180511131058_create_clusters_applications_jupyter.rb +++ b/db/migrate/20180511131058_create_clusters_applications_jupyter.rb @@ -9,15 +9,15 @@ class CreateClustersApplicationsJupyter < ActiveRecord::Migration def change create_table :clusters_applications_jupyter do |t| t.references :cluster, null: false, unique: true, foreign_key: { on_delete: :cascade } - t.references :oauth_application + t.references :oauth_application, foreign_key: { on_delete: :nullify } t.integer :status, null: false t.string :version, null: false t.string :hostname - t.text :status_reason - t.timestamps_with_timezone null: false + + t.text :status_reason end end end diff --git a/db/schema.rb b/db/schema.rb index fc03f506139..05f8fc94c64 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2208,6 +2208,8 @@ ActiveRecord::Schema.define(version: 20180529093006) do add_foreign_key "clusters_applications_helm", "clusters", on_delete: :cascade add_foreign_key "clusters_applications_ingress", "clusters", name: "fk_753a7b41c1", on_delete: :cascade add_foreign_key "clusters_applications_prometheus", "clusters", name: "fk_557e773639", 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_runners", "ci_runners", column: "runner_id", name: "fk_02de2ded36", on_delete: :nullify add_foreign_key "clusters_applications_runners", "clusters", on_delete: :cascade add_foreign_key "container_repositories", "projects" |