{ "version": "6", "dialect": "sqlite", "id": "d8d18f4f-0ed5-4256-90fb-f16073a48623", "prevId": "abfcf814-414d-4ed9-9203-c9841a0aa5d7", "tables": { "categories": { "name": "categories", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "order": { "name": "order", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": 0 } }, "indexes": { "categories_name_unique": { "name": "categories_name_unique", "columns": ["name"], "isUnique": true } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "groceries": { "name": "groceries", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "checked": { "name": "checked", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "category_id": { "name": "category_id", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": { "groceries_name_unique": { "name": "groceries_name_unique", "columns": ["name"], "isUnique": true } }, "foreignKeys": { "groceries_category_id_categories_id_fk": { "name": "groceries_category_id_categories_id_fk", "tableFrom": "groceries", "tableTo": "categories", "columnsFrom": ["category_id"], "columnsTo": ["id"], "onDelete": "set null", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "projects": { "name": "projects", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "archived": { "name": "archived", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": false } }, "indexes": { "projects_name_unique": { "name": "projects_name_unique", "columns": ["name"], "isUnique": true } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "references": { "name": "references", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "grocery_id": { "name": "grocery_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "reference": { "name": "reference", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "price": { "name": "price", "type": "real", "primaryKey": false, "notNull": false, "autoincrement": false }, "unit": { "name": "unit", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "quality_score": { "name": "quality_score", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "references_grocery_id_groceries_id_fk": { "name": "references_grocery_id_groceries_id_fk", "tableFrom": "references", "tableTo": "groceries", "columnsFrom": ["grocery_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "routine_completions": { "name": "routine_completions", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "routine_id": { "name": "routine_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "routine_version": { "name": "routine_version", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "done_at": { "name": "done_at", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "note": { "name": "note", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "routine_completions_routine_id_routine_version_routines_id_version_fk": { "name": "routine_completions_routine_id_routine_version_routines_id_version_fk", "tableFrom": "routine_completions", "tableTo": "routines", "columnsFrom": ["routine_id", "routine_version"], "columnsTo": ["id", "version"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "routines": { "name": "routines", "columns": { "id": { "name": "id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "version": { "name": "version", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "project_id": { "name": "project_id", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "frequency_days": { "name": "frequency_days", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "''" }, "archived": { "name": "archived", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "routines_project_id_projects_id_fk": { "name": "routines_project_id_projects_id_fk", "tableFrom": "routines", "tableTo": "projects", "columnsFrom": ["project_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "routines_id_version_pk": { "columns": ["id", "version"], "name": "routines_id_version_pk" } }, "uniqueConstraints": {}, "checkConstraints": {} } }, "views": {}, "enums": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} }, "internal": { "indexes": {} } }