debian-mirror-gitlab/db/migrate/20191127030005_create_serverless_domain_cluster.rb
2020-01-01 13:55:28 +05:30

17 lines
804 B
Ruby

# frozen_string_literal: true
class CreateServerlessDomainCluster < ActiveRecord::Migration[5.2]
DOWNTIME = false
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
end