24 lines
647 B
Plaintext
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}
|
|
}
|
|
}
|