panel/migrations.moon

40 lines
831 B
Plaintext
Raw Permalink Normal View History

2015-01-07 22:35:14 +00:00
import add_column, create_table, drop_column, types from require "lapis.db.schema"
2015-01-05 21:41:19 +00:00
{
[1]: =>
create_table "users", {
{ "id", types.serial }
{ "email", types.text }
{ "name", types.text }
{ "password", types.text }
"PRIMARY KEY (id)"
}
[2]: =>
add_column "users", "admin", types.boolean
2015-01-05 22:22:26 +00:00
[3]: =>
add_column "users", "extension", types.text
2015-01-05 22:50:11 +00:00
[4]: =>
add_column "users", "created_at", types.time
add_column "users", "updated_at", types.time
2015-01-06 03:26:18 +00:00
[5]: =>
add_column "users", "is_agent", types.boolean
2015-01-07 16:42:49 +00:00
[6]: =>
add_column "users", "registrar_password", types.text
2015-01-07 22:35:14 +00:00
[7]: =>
create_table "tokens", {
{ "id", types.serial }
{ "user_id", types.integer }
{ "token", types.text }
}
[8]: =>
drop_column "users", "registrar_password"
2015-01-05 21:41:19 +00:00
}