Created
August 3, 2015 18:14
-
-
Save jbranchaud/cf2404ee6c29fa338a82 to your computer and use it in GitHub Desktop.
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
# with postgres DDL | |
execute SQL<<- | |
create table users( | |
... | |
created_at timestamptz not null, | |
updated_at timestamptz not null | |
); | |
SQL | |
# with Rails DSL | |
create_table :users do |t| | |
... | |
t.column :created_at, 'timestamp with time zone', null: false | |
t.column :updated_at, 'timestamp with time zone', null: false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment