scinote-web/db/migrate/20150713063224_create_organizations.rb

12 lines
249 B
Ruby
Raw Normal View History

2017-06-30 16:23:28 +08:00
class CreateOrganizations < ActiveRecord::Migration[4.2]
2016-02-12 23:52:43 +08:00
def change
2017-01-26 23:30:31 +08:00
create_table :teams do |t|
2016-02-12 23:52:43 +08:00
## General info
t.string :name, null: false
t.timestamps null: false
end
2017-01-26 23:30:31 +08:00
add_index :teams, :name, unique: true
2016-02-12 23:52:43 +08:00
end
end