summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-06-01 07:58:18 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-06-01 07:58:18 +0000
commitd68ded2122f899bc0f478253652c4a082c98ec60 (patch)
tree945c0cd65b78b25c2302ff7eed254367a3f5ecf9 /db
parent83510980497ca72eb43fa9540be7abcbb6e811fc (diff)
parent69e9e957318f8c803461dc3bec7fc04d3ad50a72 (diff)
downloadgitlab-ce-d68ded2122f899bc0f478253652c4a082c98ec60.tar.gz
Merge branch '46487-add-support-for-jupyter-in-gitlab-via-kubernetes' into 'master'
Resolve "Add support for Jupyter in GitLab via Kubernetes" Closes #46487 See merge request gitlab-org/gitlab-ce!19019
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180511131058_create_clusters_applications_jupyter.rb23
-rw-r--r--db/schema.rb13
2 files changed, 36 insertions, 0 deletions
diff --git a/db/migrate/20180511131058_create_clusters_applications_jupyter.rb b/db/migrate/20180511131058_create_clusters_applications_jupyter.rb
new file mode 100644
index 00000000000..f3923884e37
--- /dev/null
+++ b/db/migrate/20180511131058_create_clusters_applications_jupyter.rb
@@ -0,0 +1,23 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class CreateClustersApplicationsJupyter < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ 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, foreign_key: { on_delete: :nullify }
+
+ t.integer :status, null: false
+ t.string :version, null: false
+ t.string :hostname
+
+ t.timestamps_with_timezone null: false
+
+ t.text :status_reason
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index f8663574580..97247387bc7 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -635,6 +635,17 @@ ActiveRecord::Schema.define(version: 20180529093006) do
t.string "external_ip"
end
+ create_table "clusters_applications_jupyter", force: :cascade do |t|
+ t.integer "cluster_id", null: false
+ t.integer "oauth_application_id"
+ t.integer "status", null: false
+ t.string "version", null: false
+ t.string "hostname"
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", 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
@@ -2196,6 +2207,8 @@ ActiveRecord::Schema.define(version: 20180529093006) do
add_foreign_key "clusters", "users", on_delete: :nullify
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_jupyter", "clusters", on_delete: :cascade
+ add_foreign_key "clusters_applications_jupyter", "oauth_applications", on_delete: :nullify
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