Created
January 24, 2013 09:49
-
-
Save m2web/4619327 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateTableNameSequence < ActiveRecord::Migration | |
def up | |
#create sequence for categories table | |
execute <<-SQL | |
CREATE SEQUENCE table_name_id_seq | |
INCREMENT 1 | |
MINVALUE 1 | |
MAXVALUE 9223372036854775807 | |
START 25 | |
CACHE 1; | |
SQL | |
end | |
def down | |
DROP SEQUENCE table_name_id_seq; | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment