{ "version": "6", "dialect": "sqlite", "id": "9a66d36d-d7f6-42ef-9108-05fcfb21a1ce", "prevId": "5489c6da-b9c9-4474-92f5-7dc94449677f", "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": { "name": "frequency", "type": "text", "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 }, "archived_at": { "name": "archived_at", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": 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": { "\"routines\".\"frequency_days\"": "\"routines\".\"frequency\"" } }, "internal": { "indexes": {} } }