Commit 0b2ca23b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve jupyter app db migrations

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 22866a28
...@@ -9,15 +9,15 @@ class CreateClustersApplicationsJupyter < ActiveRecord::Migration ...@@ -9,15 +9,15 @@ class CreateClustersApplicationsJupyter < ActiveRecord::Migration
def change def change
create_table :clusters_applications_jupyter do |t| create_table :clusters_applications_jupyter do |t|
t.references :cluster, null: false, unique: true, foreign_key: { on_delete: :cascade } 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.integer :status, null: false
t.string :version, null: false t.string :version, null: false
t.string :hostname t.string :hostname
t.text :status_reason
t.timestamps_with_timezone null: false t.timestamps_with_timezone null: false
t.text :status_reason
end end
end end
end end
...@@ -2208,6 +2208,8 @@ ActiveRecord::Schema.define(version: 20180529093006) do ...@@ -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_helm", "clusters", on_delete: :cascade
add_foreign_key "clusters_applications_ingress", "clusters", name: "fk_753a7b41c1", 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_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", "ci_runners", column: "runner_id", name: "fk_02de2ded36", on_delete: :nullify
add_foreign_key "clusters_applications_runners", "clusters", on_delete: :cascade add_foreign_key "clusters_applications_runners", "clusters", on_delete: :cascade
add_foreign_key "container_repositories", "projects" add_foreign_key "container_repositories", "projects"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment