diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-09-26 02:11:26 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-09-26 02:11:26 +0900 |
commit | bdc618c289b8c2b996a3ef92b7748966c311d28a (patch) | |
tree | 62fbc8778f67c14c907b50504c051433bd4536f8 /db/migrate | |
parent | cf8140a752afe9a00197b11c9f9d38098717e6df (diff) | |
download | gitlab-ce-bdc618c289b8c2b996a3ef92b7748966c311d28a.tar.gz |
ok
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20170924094327_create_ci_clusters.rb | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/db/migrate/20170924094327_create_ci_clusters.rb b/db/migrate/20170924094327_create_ci_clusters.rb index 86e75edf203..7a35fe35605 100644 --- a/db/migrate/20170924094327_create_ci_clusters.rb +++ b/db/migrate/20170924094327_create_ci_clusters.rb @@ -1,26 +1,48 @@ class CreateCiClusters < ActiveRecord::Migration DOWNTIME = false - def change + def up create_table :ci_clusters do |t| t.integer :project_id t.integer :owner_id - t.datetime_with_timezone :created_at, null: false - t.datetime_with_timezone :updated_at, null: false + t.integer :service_id + + # General t.boolean :enabled, default: true + t.integer :creation_type # manual or on_gke + + # k8s integration specific + t.string :project_namespace + + # Cluster details t.string :end_point - t.text :ca_cert # Base64? + t.text :ca_cert t.string :token t.string :username t.string :password - t.string :project_namespace - t.integer :creation_type # manual or on_gke + + # GKE + t.string :gcp_project_id + t.string :cluster_zone + t.string :cluster_name + + t.datetime_with_timezone :created_at, null: false + t.datetime_with_timezone :updated_at, null: false end + # create_table :ci_gke_clusters do |t| + # t.integer :ci_cluster_id + # t.string :gcp_project_id + # t.string :cluster_zone + # t.string :cluster_name + # end + # add_foreign_key :ci_gke_clusters, :ci_clusters + # TODO: fk, index, encypt add_foreign_key :ci_clusters, :projects add_foreign_key :ci_clusters, :users, column: :owner_id + add_foreign_key :ci_clusters, :services end def down |