{ "id": "a2bc17e8-1238-402e-ab27-8819975ac470", "prevId": "be34f81d-44be-4f79-8f27-01eebb851a6d", "version": "7", "dialect": "postgresql", "tables": { "public.account": { "name": "account", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "accountId": { "name": "accountId", "type": "text", "primaryKey": false, "notNull": true }, "providerId": { "name": "providerId", "type": "text", "primaryKey": false, "notNull": true }, "userId": { "name": "userId", "type": "text", "primaryKey": false, "notNull": true }, "accessToken": { "name": "accessToken", "type": "text", "primaryKey": false, "notNull": false }, "refreshToken": { "name": "refreshToken", "type": "text", "primaryKey": false, "notNull": false }, "idToken": { "name": "idToken", "type": "text", "primaryKey": false, "notNull": false }, "accessTokenExpiresAt": { "name": "accessTokenExpiresAt", "type": "timestamp", "primaryKey": false, "notNull": false }, "refreshTokenExpiresAt": { "name": "refreshTokenExpiresAt", "type": "timestamp", "primaryKey": false, "notNull": false }, "scope": { "name": "scope", "type": "text", "primaryKey": false, "notNull": false }, "password": { "name": "password", "type": "text", "primaryKey": false, "notNull": false }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "account_userId_user_id_fk": { "name": "account_userId_user_id_fk", "tableFrom": "account", "tableTo": "user", "columnsFrom": [ "userId" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.budget": { "name": "budget", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "amount": { "name": "amount", "type": "numeric(15, 2)", "primaryKey": false, "notNull": true }, "period": { "name": "period", "type": "text", "primaryKey": false, "notNull": true }, "category_id": { "name": "category_id", "type": "text", "primaryKey": false, "notNull": false }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "is_active": { "name": "is_active", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "alert_threshold": { "name": "alert_threshold", "type": "numeric(5, 2)", "primaryKey": false, "notNull": false, "default": "'80.00'" }, "rollover_unused": { "name": "rollover_unused", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "start_date": { "name": "start_date", "type": "timestamp", "primaryKey": false, "notNull": true }, "end_date": { "name": "end_date", "type": "timestamp", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "budget_category_id_category_id_fk": { "name": "budget_category_id_category_id_fk", "tableFrom": "budget", "tableTo": "category", "columnsFrom": [ "category_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "no action" }, "budget_user_id_user_id_fk": { "name": "budget_user_id_user_id_fk", "tableFrom": "budget", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.category": { "name": "category", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true }, "color": { "name": "color", "type": "text", "primaryKey": false, "notNull": true, "default": "'#3B82F6'" }, "icon": { "name": "icon", "type": "text", "primaryKey": false, "notNull": false }, "parent_id": { "name": "parent_id", "type": "text", "primaryKey": false, "notNull": false }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "category_user_id_user_id_fk": { "name": "category_user_id_user_id_fk", "tableFrom": "category", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.financial_account": { "name": "financial_account", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true }, "balance": { "name": "balance", "type": "numeric(15, 2)", "primaryKey": false, "notNull": true, "default": "'0.00'" }, "currency": { "name": "currency", "type": "text", "primaryKey": false, "notNull": true, "default": "'EUR'" }, "is_active": { "name": "is_active", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "account_number": { "name": "account_number", "type": "text", "primaryKey": false, "notNull": false }, "bank_name": { "name": "bank_name", "type": "text", "primaryKey": false, "notNull": false }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "financial_account_user_id_user_id_fk": { "name": "financial_account_user_id_user_id_fk", "tableFrom": "financial_account", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.financial_insight": { "name": "financial_insight", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true }, "title": { "name": "title", "type": "text", "primaryKey": false, "notNull": true }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": true }, "severity": { "name": "severity", "type": "text", "primaryKey": false, "notNull": true, "default": "'info'" }, "data": { "name": "data", "type": "jsonb", "primaryKey": false, "notNull": false }, "is_read": { "name": "is_read", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "financial_insight_user_id_user_id_fk": { "name": "financial_insight_user_id_user_id_fk", "tableFrom": "financial_insight", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.goal": { "name": "goal", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "target_amount": { "name": "target_amount", "type": "numeric(15, 2)", "primaryKey": false, "notNull": true }, "current_amount": { "name": "current_amount", "type": "numeric(15, 2)", "primaryKey": false, "notNull": true, "default": "'0.00'" }, "target_date": { "name": "target_date", "type": "timestamp", "primaryKey": false, "notNull": false }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true }, "priority": { "name": "priority", "type": "text", "primaryKey": false, "notNull": true, "default": "'medium'" }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "default": "'active'" }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "account_id": { "name": "account_id", "type": "text", "primaryKey": false, "notNull": false }, "is_recurring": { "name": "is_recurring", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "recurring_amount": { "name": "recurring_amount", "type": "numeric(15, 2)", "primaryKey": false, "notNull": false }, "recurring_interval": { "name": "recurring_interval", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "goal_user_id_user_id_fk": { "name": "goal_user_id_user_id_fk", "tableFrom": "goal", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "goal_account_id_financial_account_id_fk": { "name": "goal_account_id_financial_account_id_fk", "tableFrom": "goal", "tableTo": "financial_account", "columnsFrom": [ "account_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.report": { "name": "report", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true }, "period": { "name": "period", "type": "text", "primaryKey": false, "notNull": true }, "start_date": { "name": "start_date", "type": "timestamp", "primaryKey": false, "notNull": true }, "end_date": { "name": "end_date", "type": "timestamp", "primaryKey": false, "notNull": true }, "data": { "name": "data", "type": "jsonb", "primaryKey": false, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "report_user_id_user_id_fk": { "name": "report_user_id_user_id_fk", "tableFrom": "report", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.session": { "name": "session", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "expiresAt": { "name": "expiresAt", "type": "timestamp", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "text", "primaryKey": false, "notNull": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "ipAddress": { "name": "ipAddress", "type": "text", "primaryKey": false, "notNull": false }, "userAgent": { "name": "userAgent", "type": "text", "primaryKey": false, "notNull": false }, "userId": { "name": "userId", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "session_userId_user_id_fk": { "name": "session_userId_user_id_fk", "tableFrom": "session", "tableTo": "user", "columnsFrom": [ "userId" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "session_token_unique": { "name": "session_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.transaction": { "name": "transaction", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": true }, "amount": { "name": "amount", "type": "numeric(15, 2)", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true }, "date": { "name": "date", "type": "timestamp", "primaryKey": false, "notNull": true }, "category_id": { "name": "category_id", "type": "text", "primaryKey": false, "notNull": false }, "account_id": { "name": "account_id", "type": "text", "primaryKey": false, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "is_recurring": { "name": "is_recurring", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "recurring_interval": { "name": "recurring_interval", "type": "text", "primaryKey": false, "notNull": false }, "tags": { "name": "tags", "type": "text[]", "primaryKey": false, "notNull": false }, "notes": { "name": "notes", "type": "text", "primaryKey": false, "notNull": false }, "merchant": { "name": "merchant", "type": "text", "primaryKey": false, "notNull": false }, "location": { "name": "location", "type": "text", "primaryKey": false, "notNull": false }, "is_imported": { "name": "is_imported", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "imported_source": { "name": "imported_source", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "transaction_category_id_category_id_fk": { "name": "transaction_category_id_category_id_fk", "tableFrom": "transaction", "tableTo": "category", "columnsFrom": [ "category_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "no action" }, "transaction_account_id_financial_account_id_fk": { "name": "transaction_account_id_financial_account_id_fk", "tableFrom": "transaction", "tableTo": "financial_account", "columnsFrom": [ "account_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "transaction_user_id_user_id_fk": { "name": "transaction_user_id_user_id_fk", "tableFrom": "transaction", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user": { "name": "user", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "emailVerified": { "name": "emailVerified", "type": "boolean", "primaryKey": false, "notNull": false }, "image": { "name": "image", "type": "text", "primaryKey": false, "notNull": false }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_email_unique": { "name": "user_email_unique", "nullsNotDistinct": false, "columns": [ "email" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.verification": { "name": "verification", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "identifier": { "name": "identifier", "type": "text", "primaryKey": false, "notNull": true }, "value": { "name": "value", "type": "text", "primaryKey": false, "notNull": true }, "expiresAt": { "name": "expiresAt", "type": "timestamp", "primaryKey": false, "notNull": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false } }, "enums": {}, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } }