Created
April 30, 2013 23:47
-
-
Save hakanensari/5492772 to your computer and use it in GitHub Desktop.
Sequel + uuid-ossp
This file contains hidden or 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
Sequel.migration do | |
up do | |
run 'CREATE EXTENSION "uuid-ossp"' | |
create_table :products do | |
column :id, :uuid, :default => Sequel.function(:uuid_generate_v4), :primary_key => true | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please note that CREATE EXTENSION is only available to superuser in postgres. I do not think it is a good practice to run app migrations using superuser.