simplex2/migrations.moon
Paul Liverman III 7c6f7dab03 todo api done
2018-03-13 02:15:38 -07:00

24 lines
647 B
Plaintext

import create_table, types from require "lapis.db.schema"
import make_migrations, autoload from require "locator"
import settings from autoload "utility"
make_migrations {
[1520941132]: =>
create_table "tasks", {
{"id", types.serial primary_key: true}
{"user_id", types.foreign_key}
{"text", types.text}
{"done", types.boolean default: false}
{"created_at", types.time}
{"updated_at", types.time}
}
create_table "keys", {
{"user_id", types.foreign_key primary_key: true}
{"uuid", types.varchar unique: true}
{"created_at", types.time}
{"updated_at", types.time}
}
}