feat: add DBML schema files and relspecgo migration generation
- Add schema/*.dbml covering all existing tables (001-019) - Wire relspecgo via make generate-migrations target - Add make check-schema-drift for CI drift detection - Add schema/README.md documenting the DBML-first workflow Closes #19
This commit is contained in:
30
schema/maintenance.dbml
Normal file
30
schema/maintenance.dbml
Normal file
@@ -0,0 +1,30 @@
|
||||
Table maintenance_tasks {
|
||||
id uuid [pk, default: `gen_random_uuid()`]
|
||||
name text [not null]
|
||||
category text
|
||||
frequency_days int
|
||||
last_completed timestamptz
|
||||
next_due timestamptz
|
||||
priority text [not null, default: 'medium']
|
||||
notes text
|
||||
created_at timestamptz [not null, default: `now()`]
|
||||
updated_at timestamptz [not null, default: `now()`]
|
||||
|
||||
indexes {
|
||||
next_due
|
||||
}
|
||||
}
|
||||
|
||||
Table maintenance_logs {
|
||||
id uuid [pk, default: `gen_random_uuid()`]
|
||||
task_id uuid [not null, ref: > maintenance_tasks.id]
|
||||
completed_at timestamptz [not null, default: `now()`]
|
||||
performed_by text
|
||||
cost "decimal(10,2)"
|
||||
notes text
|
||||
next_action text
|
||||
|
||||
indexes {
|
||||
(task_id, completed_at)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user