diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-10-04 00:20:47 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-10-04 00:20:47 +0200 |
commit | c6d53250de7f439bc25740913d85ada6e3b2fed4 (patch) | |
tree | b93a8c9556851fda197f5a9bd7bfd6b540e2d44d /db/migrate | |
parent | c471430a13c79a82555ee171fecdf45b882a3c19 (diff) | |
download | gitlab-ce-c6d53250de7f439bc25740913d85ada6e3b2fed4.tar.gz |
Specify defaults, fix policies, fix db columns
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20170924094327_create_gcp_clusters.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/db/migrate/20170924094327_create_gcp_clusters.rb b/db/migrate/20170924094327_create_gcp_clusters.rb index 032db09e748..42171be7fc4 100644 --- a/db/migrate/20170924094327_create_gcp_clusters.rb +++ b/db/migrate/20170924094327_create_gcp_clusters.rb @@ -4,13 +4,13 @@ class CreateGcpClusters < ActiveRecord::Migration def change create_table :gcp_clusters do |t| t.references :project, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade } - t.references :user, null: false, foreign_key: true - t.references :service, foreign_key: true + t.references :user, foreign_key: { on_delete: :nullify } + t.references :service, foreign_key: { on_delete: :nullify } # General t.boolean :enabled, default: true t.integer :status - t.string :status_reason + t.text :status_reason # k8s integration specific t.string :project_namespace @@ -18,10 +18,10 @@ class CreateGcpClusters < ActiveRecord::Migration # Cluster details t.string :endpoint t.text :ca_cert - t.string :encrypted_kubernetes_token + t.text :encrypted_kubernetes_token t.string :encrypted_kubernetes_token_iv t.string :username - t.string :encrypted_password + t.text :encrypted_password t.string :encrypted_password_iv # GKE @@ -31,7 +31,7 @@ class CreateGcpClusters < ActiveRecord::Migration t.integer :gcp_cluster_size, null: false t.string :gcp_machine_type t.string :gcp_operation_id - t.string :encrypted_gcp_token + t.text :encrypted_gcp_token t.string :encrypted_gcp_token_iv t.datetime_with_timezone :created_at, null: false |