2017-02-02 09:04:02 -05:00
|
|
|
class CreateChatTeams < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def change
|
|
|
|
create_table :chat_teams do |t|
|
2017-02-20 08:50:32 -05:00
|
|
|
t.integer :namespace_id, index: true
|
2017-02-02 09:04:02 -05:00
|
|
|
t.string :team_id
|
|
|
|
t.string :name
|
|
|
|
|
|
|
|
t.timestamps null: false
|
|
|
|
end
|
|
|
|
|
2017-02-20 08:50:32 -05:00
|
|
|
add_foreign_key :chat_teams, :namespaces, on_delete: :cascade
|
2017-02-02 09:04:02 -05:00
|
|
|
end
|
|
|
|
end
|