2017-08-31 00:06:56 -04:00
|
|
|
class AddAutomaticToGroups < ActiveRecord::Migration[4.2]
|
2013-05-06 00:49:56 -04:00
|
|
|
def up
|
|
|
|
add_column :groups, :automatic, :boolean, default: false, null: false
|
|
|
|
|
|
|
|
# all numbers below 100 are reserved for automatic
|
|
|
|
execute <<SQL
|
|
|
|
ALTER SEQUENCE groups_id_seq START WITH 100
|
|
|
|
SQL
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_column :groups, :automatic
|
|
|
|
end
|
|
|
|
end
|