Created
November 30, 2011 14:36
-
-
Save criminy/1409272 to your computer and use it in GitHub Desktop.
Mockup of ActiveRecord-style using groovy/gradle style.
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
accounts = table("accounts") | |
migration("add_ssl") { | |
up { | |
add_column accounts "ssl_enabled" Fields.boolean { | |
defaults 1 | |
} | |
} | |
down { | |
remove_column accounts "ssl_enabled" | |
} | |
} |
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
migration("create_accounts") { | |
up { | |
create_table "accounts" { | |
string "name" | |
string "password" | |
} | |
} | |
down { | |
drop_table "accounts" | |
} | |
} |
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
database { | |
name "asdf" | |
table_prefix = "tbl_" | |
migrations { | |
ref "create_accounts" | |
ref "add_ssl" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment