{ "id": "11ef4db2-b7b7-446a-99c2-b33cd6e51330", "prevId": "6361225a-92cc-4983-8f6b-06193d940300", "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 with time zone", "primaryKey": false, "notNull": false }, "refreshTokenExpiresAt": { "name": "refreshTokenExpiresAt", "type": "timestamp with time zone", "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 with time zone", "primaryKey": false, "notNull": true }, "updatedAt": { "name": "updatedAt", "type": "timestamp with time zone", "primaryKey": false, "notNull": true } }, "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.anotacoes": { "name": "anotacoes", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "titulo": { "name": "titulo", "type": "text", "primaryKey": false, "notNull": false }, "descricao": { "name": "descricao", "type": "text", "primaryKey": false, "notNull": false }, "tipo": { "name": "tipo", "type": "text", "primaryKey": false, "notNull": true, "default": "'nota'" }, "tasks": { "name": "tasks", "type": "text", "primaryKey": false, "notNull": false }, "arquivada": { "name": "arquivada", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "anotacoes_user_id_user_id_fk": { "name": "anotacoes_user_id_user_id_fk", "tableFrom": "anotacoes", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.cartoes": { "name": "cartoes", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "nome": { "name": "nome", "type": "text", "primaryKey": false, "notNull": true }, "dt_fechamento": { "name": "dt_fechamento", "type": "text", "primaryKey": false, "notNull": true }, "dt_vencimento": { "name": "dt_vencimento", "type": "text", "primaryKey": false, "notNull": true }, "anotacao": { "name": "anotacao", "type": "text", "primaryKey": false, "notNull": false }, "limite": { "name": "limite", "type": "numeric(10, 2)", "primaryKey": false, "notNull": false }, "bandeira": { "name": "bandeira", "type": "text", "primaryKey": false, "notNull": false }, "logo": { "name": "logo", "type": "text", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "conta_id": { "name": "conta_id", "type": "uuid", "primaryKey": false, "notNull": true } }, "indexes": { "cartoes_user_id_status_idx": { "name": "cartoes_user_id_status_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "status", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "cartoes_user_id_user_id_fk": { "name": "cartoes_user_id_user_id_fk", "tableFrom": "cartoes", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "cartoes_conta_id_contas_id_fk": { "name": "cartoes_conta_id_contas_id_fk", "tableFrom": "cartoes", "tableTo": "contas", "columnsFrom": ["conta_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.categorias": { "name": "categorias", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "nome": { "name": "nome", "type": "text", "primaryKey": false, "notNull": true }, "tipo": { "name": "tipo", "type": "text", "primaryKey": false, "notNull": true }, "icone": { "name": "icone", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": { "categorias_user_id_type_idx": { "name": "categorias_user_id_type_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "tipo", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "categorias_user_id_user_id_fk": { "name": "categorias_user_id_user_id_fk", "tableFrom": "categorias", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.contas": { "name": "contas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "nome": { "name": "nome", "type": "text", "primaryKey": false, "notNull": true }, "tipo_conta": { "name": "tipo_conta", "type": "text", "primaryKey": false, "notNull": true }, "anotacao": { "name": "anotacao", "type": "text", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true }, "logo": { "name": "logo", "type": "text", "primaryKey": false, "notNull": true }, "saldo_inicial": { "name": "saldo_inicial", "type": "numeric(12, 2)", "primaryKey": false, "notNull": true, "default": "'0'" }, "excluir_do_saldo": { "name": "excluir_do_saldo", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "excluir_saldo_inicial_receitas": { "name": "excluir_saldo_inicial_receitas", "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 with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "contas_user_id_status_idx": { "name": "contas_user_id_status_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "status", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "contas_user_id_user_id_fk": { "name": "contas_user_id_user_id_fk", "tableFrom": "contas", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.faturas": { "name": "faturas", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "status_pagamento": { "name": "status_pagamento", "type": "text", "primaryKey": false, "notNull": false }, "periodo": { "name": "periodo", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "cartao_id": { "name": "cartao_id", "type": "uuid", "primaryKey": false, "notNull": false } }, "indexes": { "faturas_user_id_period_idx": { "name": "faturas_user_id_period_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "periodo", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "faturas_cartao_id_period_idx": { "name": "faturas_cartao_id_period_idx", "columns": [ { "expression": "cartao_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "periodo", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "faturas_user_id_user_id_fk": { "name": "faturas_user_id_user_id_fk", "tableFrom": "faturas", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "faturas_cartao_id_cartoes_id_fk": { "name": "faturas_cartao_id_cartoes_id_fk", "tableFrom": "faturas", "tableTo": "cartoes", "columnsFrom": ["cartao_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.installment_anticipations": { "name": "installment_anticipations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "series_id": { "name": "series_id", "type": "uuid", "primaryKey": false, "notNull": true }, "periodo_antecipacao": { "name": "periodo_antecipacao", "type": "text", "primaryKey": false, "notNull": true }, "data_antecipacao": { "name": "data_antecipacao", "type": "date", "primaryKey": false, "notNull": true }, "parcelas_antecipadas": { "name": "parcelas_antecipadas", "type": "jsonb", "primaryKey": false, "notNull": true }, "valor_total": { "name": "valor_total", "type": "numeric(12, 2)", "primaryKey": false, "notNull": true }, "qtde_parcelas": { "name": "qtde_parcelas", "type": "smallint", "primaryKey": false, "notNull": true }, "desconto": { "name": "desconto", "type": "numeric(12, 2)", "primaryKey": false, "notNull": true, "default": "'0'" }, "lancamento_id": { "name": "lancamento_id", "type": "uuid", "primaryKey": false, "notNull": true }, "pagador_id": { "name": "pagador_id", "type": "uuid", "primaryKey": false, "notNull": false }, "categoria_id": { "name": "categoria_id", "type": "uuid", "primaryKey": false, "notNull": false }, "anotacao": { "name": "anotacao", "type": "text", "primaryKey": false, "notNull": false }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "installment_anticipations_series_id_idx": { "name": "installment_anticipations_series_id_idx", "columns": [ { "expression": "series_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "installment_anticipations_user_id_idx": { "name": "installment_anticipations_user_id_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "installment_anticipations_lancamento_id_lancamentos_id_fk": { "name": "installment_anticipations_lancamento_id_lancamentos_id_fk", "tableFrom": "installment_anticipations", "tableTo": "lancamentos", "columnsFrom": ["lancamento_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "installment_anticipations_pagador_id_pagadores_id_fk": { "name": "installment_anticipations_pagador_id_pagadores_id_fk", "tableFrom": "installment_anticipations", "tableTo": "pagadores", "columnsFrom": ["pagador_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "installment_anticipations_categoria_id_categorias_id_fk": { "name": "installment_anticipations_categoria_id_categorias_id_fk", "tableFrom": "installment_anticipations", "tableTo": "categorias", "columnsFrom": ["categoria_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "installment_anticipations_user_id_user_id_fk": { "name": "installment_anticipations_user_id_user_id_fk", "tableFrom": "installment_anticipations", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.lancamentos": { "name": "lancamentos", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "condicao": { "name": "condicao", "type": "text", "primaryKey": false, "notNull": true }, "nome": { "name": "nome", "type": "text", "primaryKey": false, "notNull": true }, "forma_pagamento": { "name": "forma_pagamento", "type": "text", "primaryKey": false, "notNull": true }, "anotacao": { "name": "anotacao", "type": "text", "primaryKey": false, "notNull": false }, "valor": { "name": "valor", "type": "numeric(12, 2)", "primaryKey": false, "notNull": true }, "data_compra": { "name": "data_compra", "type": "date", "primaryKey": false, "notNull": true }, "tipo_transacao": { "name": "tipo_transacao", "type": "text", "primaryKey": false, "notNull": true }, "qtde_parcela": { "name": "qtde_parcela", "type": "smallint", "primaryKey": false, "notNull": false }, "periodo": { "name": "periodo", "type": "text", "primaryKey": false, "notNull": true }, "parcela_atual": { "name": "parcela_atual", "type": "smallint", "primaryKey": false, "notNull": false }, "qtde_recorrencia": { "name": "qtde_recorrencia", "type": "integer", "primaryKey": false, "notNull": false }, "data_vencimento": { "name": "data_vencimento", "type": "date", "primaryKey": false, "notNull": false }, "dt_pagamento_boleto": { "name": "dt_pagamento_boleto", "type": "date", "primaryKey": false, "notNull": false }, "realizado": { "name": "realizado", "type": "boolean", "primaryKey": false, "notNull": false, "default": false }, "dividido": { "name": "dividido", "type": "boolean", "primaryKey": false, "notNull": false, "default": false }, "antecipado": { "name": "antecipado", "type": "boolean", "primaryKey": false, "notNull": false, "default": false }, "antecipacao_id": { "name": "antecipacao_id", "type": "uuid", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "cartao_id": { "name": "cartao_id", "type": "uuid", "primaryKey": false, "notNull": false }, "conta_id": { "name": "conta_id", "type": "uuid", "primaryKey": false, "notNull": false }, "categoria_id": { "name": "categoria_id", "type": "uuid", "primaryKey": false, "notNull": false }, "pagador_id": { "name": "pagador_id", "type": "uuid", "primaryKey": false, "notNull": false }, "series_id": { "name": "series_id", "type": "uuid", "primaryKey": false, "notNull": false }, "transfer_id": { "name": "transfer_id", "type": "uuid", "primaryKey": false, "notNull": false } }, "indexes": { "lancamentos_user_id_period_idx": { "name": "lancamentos_user_id_period_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "periodo", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "lancamentos_user_id_purchase_date_idx": { "name": "lancamentos_user_id_purchase_date_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "data_compra", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "lancamentos_series_id_idx": { "name": "lancamentos_series_id_idx", "columns": [ { "expression": "series_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "lancamentos_transfer_id_idx": { "name": "lancamentos_transfer_id_idx", "columns": [ { "expression": "transfer_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "lancamentos_user_id_condition_idx": { "name": "lancamentos_user_id_condition_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "condicao", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "lancamentos_cartao_id_period_idx": { "name": "lancamentos_cartao_id_period_idx", "columns": [ { "expression": "cartao_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "periodo", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "lancamentos_antecipacao_id_installment_anticipations_id_fk": { "name": "lancamentos_antecipacao_id_installment_anticipations_id_fk", "tableFrom": "lancamentos", "tableTo": "installment_anticipations", "columnsFrom": ["antecipacao_id"], "columnsTo": ["id"], "onDelete": "set null", "onUpdate": "no action" }, "lancamentos_user_id_user_id_fk": { "name": "lancamentos_user_id_user_id_fk", "tableFrom": "lancamentos", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "lancamentos_cartao_id_cartoes_id_fk": { "name": "lancamentos_cartao_id_cartoes_id_fk", "tableFrom": "lancamentos", "tableTo": "cartoes", "columnsFrom": ["cartao_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "cascade" }, "lancamentos_conta_id_contas_id_fk": { "name": "lancamentos_conta_id_contas_id_fk", "tableFrom": "lancamentos", "tableTo": "contas", "columnsFrom": ["conta_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "cascade" }, "lancamentos_categoria_id_categorias_id_fk": { "name": "lancamentos_categoria_id_categorias_id_fk", "tableFrom": "lancamentos", "tableTo": "categorias", "columnsFrom": ["categoria_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "cascade" }, "lancamentos_pagador_id_pagadores_id_fk": { "name": "lancamentos_pagador_id_pagadores_id_fk", "tableFrom": "lancamentos", "tableTo": "pagadores", "columnsFrom": ["pagador_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.orcamentos": { "name": "orcamentos", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "valor": { "name": "valor", "type": "numeric(10, 2)", "primaryKey": false, "notNull": true }, "periodo": { "name": "periodo", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "categoria_id": { "name": "categoria_id", "type": "uuid", "primaryKey": false, "notNull": false } }, "indexes": { "orcamentos_user_id_period_idx": { "name": "orcamentos_user_id_period_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "periodo", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "orcamentos_user_id_user_id_fk": { "name": "orcamentos_user_id_user_id_fk", "tableFrom": "orcamentos", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "orcamentos_categoria_id_categorias_id_fk": { "name": "orcamentos_categoria_id_categorias_id_fk", "tableFrom": "orcamentos", "tableTo": "categorias", "columnsFrom": ["categoria_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.pagador_shares": { "name": "pagador_shares", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "pagador_id": { "name": "pagador_id", "type": "uuid", "primaryKey": false, "notNull": true }, "shared_with_user_id": { "name": "shared_with_user_id", "type": "text", "primaryKey": false, "notNull": true }, "permission": { "name": "permission", "type": "text", "primaryKey": false, "notNull": true, "default": "'read'" }, "created_by_user_id": { "name": "created_by_user_id", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "pagador_shares_unique": { "name": "pagador_shares_unique", "columns": [ { "expression": "pagador_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "shared_with_user_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "pagador_shares_pagador_id_pagadores_id_fk": { "name": "pagador_shares_pagador_id_pagadores_id_fk", "tableFrom": "pagador_shares", "tableTo": "pagadores", "columnsFrom": ["pagador_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "pagador_shares_shared_with_user_id_user_id_fk": { "name": "pagador_shares_shared_with_user_id_user_id_fk", "tableFrom": "pagador_shares", "tableTo": "user", "columnsFrom": ["shared_with_user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "pagador_shares_created_by_user_id_user_id_fk": { "name": "pagador_shares_created_by_user_id_user_id_fk", "tableFrom": "pagador_shares", "tableTo": "user", "columnsFrom": ["created_by_user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.pagadores": { "name": "pagadores", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "nome": { "name": "nome", "type": "text", "primaryKey": false, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": false }, "avatar_url": { "name": "avatar_url", "type": "text", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true }, "anotacao": { "name": "anotacao", "type": "text", "primaryKey": false, "notNull": false }, "role": { "name": "role", "type": "text", "primaryKey": false, "notNull": false }, "is_auto_send": { "name": "is_auto_send", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "share_code": { "name": "share_code", "type": "text", "primaryKey": false, "notNull": true, "default": "substr(encode(gen_random_bytes(24), 'base64'), 1, 24)" }, "last_mail": { "name": "last_mail", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": { "pagadores_share_code_key": { "name": "pagadores_share_code_key", "columns": [ { "expression": "share_code", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} }, "pagadores_user_id_status_idx": { "name": "pagadores_user_id_status_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "status", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "pagadores_user_id_role_idx": { "name": "pagadores_user_id_role_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "role", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "pagadores_user_id_user_id_fk": { "name": "pagadores_user_id_user_id_fk", "tableFrom": "pagadores", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.saved_insights": { "name": "saved_insights", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "period": { "name": "period", "type": "text", "primaryKey": false, "notNull": true }, "model_id": { "name": "model_id", "type": "text", "primaryKey": false, "notNull": true }, "data": { "name": "data", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "saved_insights_user_period_idx": { "name": "saved_insights_user_period_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "period", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "saved_insights_user_id_user_id_fk": { "name": "saved_insights_user_id_user_id_fk", "tableFrom": "saved_insights", "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 with time zone", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "text", "primaryKey": false, "notNull": true }, "createdAt": { "name": "createdAt", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "updatedAt": { "name": "updatedAt", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "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.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": true }, "image": { "name": "image", "type": "text", "primaryKey": false, "notNull": false }, "createdAt": { "name": "createdAt", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "updatedAt": { "name": "updatedAt", "type": "timestamp with time zone", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_email_unique": { "name": "user_email_unique", "nullsNotDistinct": false, "columns": ["email"] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_preferences": { "name": "user_preferences", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "disable_magnetlines": { "name": "disable_magnetlines", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "period_months_before": { "name": "period_months_before", "type": "integer", "primaryKey": false, "notNull": true, "default": 3 }, "period_months_after": { "name": "period_months_after", "type": "integer", "primaryKey": false, "notNull": true, "default": 3 }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "user_preferences_user_id_user_id_fk": { "name": "user_preferences_user_id_user_id_fk", "tableFrom": "user_preferences", "tableTo": "user", "columnsFrom": ["user_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_preferences_user_id_unique": { "name": "user_preferences_user_id_unique", "nullsNotDistinct": false, "columns": ["user_id"] } }, "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 with time zone", "primaryKey": false, "notNull": true }, "createdAt": { "name": "createdAt", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "updatedAt": { "name": "updatedAt", "type": "timestamp with time zone", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false } }, "enums": {}, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } }