2017-06-13 07:44:13 -04:00
|
|
|
# rubocop:disable Migration/Timestamps
|
2018-11-13 02:27:31 -05:00
|
|
|
class CreateChatTeams < ActiveRecord::Migration[4.2]
|
2017-02-02 09:04:02 -05:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
2017-02-24 07:25:42 -05:00
|
|
|
DOWNTIME = true
|
|
|
|
DOWNTIME_REASON = "Adding a foreign key"
|
2017-02-02 09:04:02 -05:00
|
|
|
|
2017-03-01 14:34:29 -05:00
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2017-02-02 09:04:02 -05:00
|
|
|
def change
|
|
|
|
create_table :chat_teams do |t|
|
2017-03-06 02:55:30 -05:00
|
|
|
t.references :namespace, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade }
|
2017-02-02 09:04:02 -05:00
|
|
|
t.string :team_id
|
|
|
|
t.string :name
|
|
|
|
|
|
|
|
t.timestamps null: false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|