Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-11-06 12:41:27 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-11-06 12:41:27 +0300
commitd8223468ae2ae061020cc26336c51dc93cc75571 (patch)
tree9855fdb31d017c1501703f46a8c3965cbf0ed180 /db
parent3a174c999dfb61f2dde53f6eb7b2baec8b5e3683 (diff)
Add ingress application
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20171106101200_create_clusters_kubernetes_ingress_apps.rb21
-rw-r--r--db/schema.rb25
2 files changed, 35 insertions, 11 deletions
diff --git a/db/migrate/20171106101200_create_clusters_kubernetes_ingress_apps.rb b/db/migrate/20171106101200_create_clusters_kubernetes_ingress_apps.rb
new file mode 100644
index 00000000000..21f48b1d1b4
--- /dev/null
+++ b/db/migrate/20171106101200_create_clusters_kubernetes_ingress_apps.rb
@@ -0,0 +1,21 @@
+class CreateClustersKubernetesIngressApps < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ create_table :clusters_applications_ingress 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.integer :ingress_type, null: false
+
+ t.string :version, null: false
+ t.string :cluster_ip
+ t.text :status_reason
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 548f4711339..2e5c98f2541 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20171031100710) do
+ActiveRecord::Schema.define(version: 20171106101200) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -464,9 +464,7 @@ ActiveRecord::Schema.define(version: 20171031100710) do
create_table "cluster_platforms_kubernetes", 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.text "api_url"
+ t.string "api_url"
t.text "ca_cert"
t.string "namespace"
t.string "username"
@@ -493,9 +491,6 @@ ActiveRecord::Schema.define(version: 20171031100710) do
create_table "cluster_providers_gcp", force: :cascade do |t|
t.integer "cluster_id", null: false
t.integer "status"
- t.integer "num_nodes", null: false
- t.datetime_with_timezone "created_at", null: false
- t.datetime_with_timezone "updated_at", null: false
t.text "status_reason"
t.string "gcp_project_id", null: false
t.string "zone", null: false
@@ -513,10 +508,6 @@ ActiveRecord::Schema.define(version: 20171031100710) do
create_table "clusters", force: :cascade do |t|
t.integer "user_id"
- t.integer "provider_type"
- t.integer "platform_type"
- t.datetime_with_timezone "created_at", null: false
- t.datetime_with_timezone "updated_at", null: false
t.boolean "enabled", default: true
t.string "name", null: false
t.integer "provider_type"
@@ -534,6 +525,17 @@ ActiveRecord::Schema.define(version: 20171031100710) do
t.text "status_reason"
end
+ create_table "clusters_applications_ingress", 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.integer "ingress_type", null: false
+ t.string "version", null: false
+ t.string "cluster_ip"
+ t.text "status_reason"
+ end
+
create_table "container_repositories", force: :cascade do |t|
t.integer "project_id", null: false
t.string "name", null: false
@@ -1888,6 +1890,7 @@ ActiveRecord::Schema.define(version: 20171031100710) do
add_foreign_key "cluster_providers_gcp", "clusters", on_delete: :cascade
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", on_delete: :cascade
add_foreign_key "container_repositories", "projects"
add_foreign_key "deploy_keys_projects", "projects", name: "fk_58a901ca7e", on_delete: :cascade
add_foreign_key "deployments", "projects", name: "fk_b9a3851b82", on_delete: :cascade