debian-mirror-gitlab/db/migrate/20191127030005_create_serverless_domain_cluster.rb

20 lines
893 B
Ruby
Raw Normal View History

2020-01-01 13:55:28 +05:30
# frozen_string_literal: true
class CreateServerlessDomainCluster < ActiveRecord::Migration[5.2]
DOWNTIME = false
2020-05-24 23:13:21 +05:30
# rubocop:disable Migration/PreventStrings
2020-01-01 13:55:28 +05:30
def change
create_table :serverless_domain_cluster, id: false, primary_key: :uuid do |t|
t.references :pages_domain, null: false, foreign_key: { on_delete: :cascade }
t.references :clusters_applications_knative, null: false,
foreign_key: { to_table: :clusters_applications_knative, on_delete: :cascade },
index: { name: :idx_serverless_domain_cluster_on_clusters_applications_knative, unique: true }
t.references :creator, name: :created_by, foreign_key: { to_table: :users, on_delete: :nullify }
t.timestamps_with_timezone null: false
t.string :uuid, null: false, limit: 14, primary_key: true
end
end
2020-05-24 23:13:21 +05:30
# rubocop:enable Migration/PreventStrings
2020-01-01 13:55:28 +05:30
end