{ "id": "00000000-0000-0000-0000-000000000000", "prevId": "", "version": "7", "dialect": "postgresql", "tables": { "public.deliveries": { "name": "deliveries", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "order_id": { "name": "order_id", "type": "integer", "primaryKey": false, "notNull": false }, "supplier_id": { "name": "supplier_id", "type": "integer", "primaryKey": false, "notNull": true }, "group_id": { "name": "group_id", "type": "integer", "primaryKey": false, "notNull": true }, "delivered_date": { "name": "delivered_date", "type": "timestamp", "primaryKey": false, "notNull": false }, "quantity": { "name": "quantity", "type": "integer", "primaryKey": false, "notNull": true }, "unit": { "name": "unit", "type": "varchar", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "varchar", "primaryKey": false, "notNull": true, "default": "'planned'" }, "created_by": { "name": "created_by", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "bl_number": { "name": "bl_number", "type": "varchar", "primaryKey": false, "notNull": false }, "bl_amount": { "name": "bl_amount", "type": "numeric(10, 2)", "primaryKey": false, "notNull": false }, "invoice_reference": { "name": "invoice_reference", "type": "varchar", "primaryKey": false, "notNull": false }, "invoice_amount": { "name": "invoice_amount", "type": "numeric(10, 2)", "primaryKey": false, "notNull": false }, "reconciled": { "name": "reconciled", "type": "boolean", "primaryKey": false, "notNull": false, "default": false }, "scheduled_date": { "name": "scheduled_date", "type": "date", "primaryKey": false, "notNull": true }, "notes": { "name": "notes", "type": "text", "primaryKey": false, "notNull": false }, "validated_at": { "name": "validated_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": { "idx_deliveries_bl_number": { "name": "idx_deliveries_bl_number", "columns": [ { "expression": "bl_number", "asc": true, "nulls": "last", "opclass": "text_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "idx_deliveries_group_id": { "name": "idx_deliveries_group_id", "columns": [ { "expression": "group_id", "asc": true, "nulls": "last", "opclass": "int4_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "idx_deliveries_invoice_ref": { "name": "idx_deliveries_invoice_ref", "columns": [ { "expression": "invoice_reference", "asc": true, "nulls": "last", "opclass": "text_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "idx_deliveries_status": { "name": "idx_deliveries_status", "columns": [ { "expression": "status", "asc": true, "nulls": "last", "opclass": "text_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": { "deliveries_status_check_fixed": { "name": "deliveries_status_check_fixed", "value": "(status)::text = ANY ((ARRAY['planned'::character varying, 'delivered'::character varying])::text[])" } }, "policies": {}, "isRLSEnabled": false }, "public.orders": { "name": "orders", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "supplier_id": { "name": "supplier_id", "type": "integer", "primaryKey": false, "notNull": true }, "group_id": { "name": "group_id", "type": "integer", "primaryKey": false, "notNull": true }, "planned_date": { "name": "planned_date", "type": "date", "primaryKey": false, "notNull": true }, "quantity": { "name": "quantity", "type": "integer", "primaryKey": false, "notNull": false }, "unit": { "name": "unit", "type": "varchar", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "varchar", "primaryKey": false, "notNull": true, "default": "'pending'" }, "created_by": { "name": "created_by", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "notes": { "name": "notes", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": { "idx_orders_group_id": { "name": "idx_orders_group_id", "columns": [ { "expression": "group_id", "asc": true, "nulls": "last", "opclass": "int4_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "idx_orders_status": { "name": "idx_orders_status", "columns": [ { "expression": "status", "asc": true, "nulls": "last", "opclass": "text_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": { "orders_status_check": { "name": "orders_status_check", "value": "(status)::text = ANY ((ARRAY['pending'::character varying, 'planned'::character varying, 'delivered'::character varying])::text[])" } }, "policies": {}, "isRLSEnabled": false }, "public.groups": { "name": "groups", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "color": { "name": "color", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "nocodb_config_id": { "name": "nocodb_config_id", "type": "integer", "primaryKey": false, "notNull": false }, "nocodb_table_id": { "name": "nocodb_table_id", "type": "varchar", "primaryKey": false, "notNull": false }, "nocodb_table_name": { "name": "nocodb_table_name", "type": "varchar", "primaryKey": false, "notNull": false }, "invoice_column_name": { "name": "invoice_column_name", "type": "varchar", "primaryKey": false, "notNull": false, "default": "'Ref Facture'" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.sessions": { "name": "sessions", "schema": "", "columns": { "sid": { "name": "sid", "type": "varchar", "primaryKey": true, "notNull": true }, "sess": { "name": "sess", "type": "jsonb", "primaryKey": false, "notNull": true }, "expire": { "name": "expire", "type": "timestamp", "primaryKey": false, "notNull": true } }, "indexes": { "IDX_session_expire": { "name": "IDX_session_expire", "columns": [ { "expression": "expire", "asc": true, "nulls": "last", "opclass": "timestamp_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.suppliers": { "name": "suppliers", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "contact": { "name": "contact", "type": "varchar", "primaryKey": false, "notNull": false }, "phone": { "name": "phone", "type": "varchar", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "has_dlc": { "name": "has_dlc", "type": "boolean", "primaryKey": false, "notNull": false, "default": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.user_groups": { "name": "user_groups", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "varchar", "primaryKey": false, "notNull": true }, "group_id": { "name": "group_id", "type": "integer", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.publicities": { "name": "publicities", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "pub_number": { "name": "pub_number", "type": "varchar(255)", "primaryKey": false, "notNull": true }, "designation": { "name": "designation", "type": "text", "primaryKey": false, "notNull": true }, "start_date": { "name": "start_date", "type": "date", "primaryKey": false, "notNull": true }, "end_date": { "name": "end_date", "type": "date", "primaryKey": false, "notNull": true }, "year": { "name": "year", "type": "integer", "primaryKey": false, "notNull": true }, "created_by": { "name": "created_by", "type": "varchar(255)", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "CURRENT_TIMESTAMP" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "CURRENT_TIMESTAMP" } }, "indexes": { "idx_publicities_start_date": { "name": "idx_publicities_start_date", "columns": [ { "expression": "start_date", "asc": true, "nulls": "last", "opclass": "date_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "idx_publicities_year": { "name": "idx_publicities_year", "columns": [ { "expression": "year", "asc": true, "nulls": "last", "opclass": "int4_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.session": { "name": "session", "schema": "", "columns": { "sid": { "name": "sid", "type": "varchar", "primaryKey": true, "notNull": true }, "sess": { "name": "sess", "type": "json", "primaryKey": false, "notNull": true }, "expire": { "name": "expire", "type": "timestamp(6)", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "varchar", "primaryKey": true, "notNull": true }, "email": { "name": "email", "type": "varchar", "primaryKey": false, "notNull": false }, "first_name": { "name": "first_name", "type": "varchar", "primaryKey": false, "notNull": false }, "last_name": { "name": "last_name", "type": "varchar", "primaryKey": false, "notNull": false }, "profile_image_url": { "name": "profile_image_url", "type": "varchar", "primaryKey": false, "notNull": false }, "role": { "name": "role", "type": "varchar", "primaryKey": false, "notNull": true, "default": "'employee'" }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "password": { "name": "password", "type": "varchar", "primaryKey": false, "notNull": false }, "username": { "name": "username", "type": "varchar", "primaryKey": false, "notNull": false }, "password_changed": { "name": "password_changed", "type": "boolean", "primaryKey": false, "notNull": false, "default": false }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "users_email_unique": { "columns": [ "email" ], "nullsNotDistinct": false, "name": "users_email_unique" }, "users_username_key": { "columns": [ "username" ], "nullsNotDistinct": false, "name": "users_username_key" } }, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.roles": { "name": "roles", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "varchar(100)", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar(200)", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "color": { "name": "color", "type": "varchar(20)", "primaryKey": false, "notNull": false, "default": "'#6b7280'" }, "is_system": { "name": "is_system", "type": "boolean", "primaryKey": false, "notNull": false, "default": false }, "is_active": { "name": "is_active", "type": "boolean", "primaryKey": false, "notNull": false, "default": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "CURRENT_TIMESTAMP" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "CURRENT_TIMESTAMP" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "roles_name_key": { "columns": [ "name" ], "nullsNotDistinct": false, "name": "roles_name_key" } }, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.permissions": { "name": "permissions", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "varchar(100)", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "varchar(200)", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "category": { "name": "category", "type": "varchar(50)", "primaryKey": false, "notNull": true }, "action": { "name": "action", "type": "varchar(50)", "primaryKey": false, "notNull": true }, "resource": { "name": "resource", "type": "varchar(50)", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "CURRENT_TIMESTAMP" }, "is_system": { "name": "is_system", "type": "boolean", "primaryKey": false, "notNull": false, "default": false }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "CURRENT_TIMESTAMP" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "permissions_name_key": { "columns": [ "name" ], "nullsNotDistinct": false, "name": "permissions_name_key" } }, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.nocodb_config": { "name": "nocodb_config", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "varchar", "primaryKey": false, "notNull": true }, "base_url": { "name": "base_url", "type": "varchar", "primaryKey": false, "notNull": true }, "api_token": { "name": "api_token", "type": "varchar", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "is_active": { "name": "is_active", "type": "boolean", "primaryKey": false, "notNull": false, "default": true }, "created_by": { "name": "created_by", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "project_id": { "name": "project_id", "type": "varchar", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.customer_orders": { "name": "customer_orders", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "order_taker": { "name": "order_taker", "type": "varchar", "primaryKey": false, "notNull": true }, "customer_name": { "name": "customer_name", "type": "varchar", "primaryKey": false, "notNull": true }, "customer_phone": { "name": "customer_phone", "type": "varchar", "primaryKey": false, "notNull": true }, "product_designation": { "name": "product_designation", "type": "text", "primaryKey": false, "notNull": true }, "product_reference": { "name": "product_reference", "type": "varchar", "primaryKey": false, "notNull": false }, "gencode": { "name": "gencode", "type": "varchar", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "varchar", "primaryKey": false, "notNull": true, "default": "'En attente de Commande'" }, "deposit": { "name": "deposit", "type": "numeric(10, 2)", "primaryKey": false, "notNull": false, "default": "'0.00'" }, "is_promotional_price": { "name": "is_promotional_price", "type": "boolean", "primaryKey": false, "notNull": false, "default": false }, "customer_notified": { "name": "customer_notified", "type": "boolean", "primaryKey": false, "notNull": false, "default": false }, "group_id": { "name": "group_id", "type": "integer", "primaryKey": false, "notNull": true }, "created_by": { "name": "created_by", "type": "varchar", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "now()" }, "supplier_id": { "name": "supplier_id", "type": "integer", "primaryKey": false, "notNull": false }, "quantity": { "name": "quantity", "type": "integer", "primaryKey": false, "notNull": true, "default": 1 }, "customer_email": { "name": "customer_email", "type": "varchar(255)", "primaryKey": false, "notNull": false }, "notes": { "name": "notes", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.dlc_products": { "name": "dlc_products", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "product_name": { "name": "product_name", "type": "varchar(255)", "primaryKey": false, "notNull": true }, "expiry_date": { "name": "expiry_date", "type": "date", "primaryKey": false, "notNull": true }, "date_type": { "name": "date_type", "type": "varchar(10)", "primaryKey": false, "notNull": true }, "quantity": { "name": "quantity", "type": "integer", "primaryKey": false, "notNull": true }, "unit": { "name": "unit", "type": "varchar(50)", "primaryKey": false, "notNull": true }, "supplier_id": { "name": "supplier_id", "type": "integer", "primaryKey": false, "notNull": true }, "location": { "name": "location", "type": "varchar(255)", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "varchar(20)", "primaryKey": false, "notNull": true, "default": "'en_cours'" }, "notes": { "name": "notes", "type": "text", "primaryKey": false, "notNull": false }, "alert_threshold": { "name": "alert_threshold", "type": "integer", "primaryKey": false, "notNull": true, "default": 3 }, "validated_at": { "name": "validated_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "validated_by": { "name": "validated_by", "type": "varchar(255)", "primaryKey": false, "notNull": false }, "group_id": { "name": "group_id", "type": "integer", "primaryKey": false, "notNull": true }, "created_by": { "name": "created_by", "type": "varchar(255)", "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()" }, "gencode": { "name": "gencode", "type": "varchar", "primaryKey": false, "notNull": false }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, "notNull": false }, "dlc_date": { "name": "dlc_date", "type": "date", "primaryKey": false, "notNull": false }, "product_code": { "name": "product_code", "type": "varchar(255)", "primaryKey": false, "notNull": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": { "idx_dlc_products_expiry_date": { "name": "idx_dlc_products_expiry_date", "columns": [ { "expression": "expiry_date", "asc": true, "nulls": "last", "opclass": "date_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "idx_dlc_products_group_id": { "name": "idx_dlc_products_group_id", "columns": [ { "expression": "group_id", "asc": true, "nulls": "last", "opclass": "int4_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "idx_dlc_products_status": { "name": "idx_dlc_products_status", "columns": [ { "expression": "status", "asc": true, "nulls": "last", "opclass": "text_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "idx_dlc_products_supplier_id": { "name": "idx_dlc_products_supplier_id", "columns": [ { "expression": "supplier_id", "asc": true, "nulls": "last", "opclass": "int4_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "dlc_products_supplier_id_fkey": { "name": "dlc_products_supplier_id_fkey", "tableFrom": "dlc_products", "tableTo": "suppliers", "schemaTo": "public", "columnsFrom": [ "supplier_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "dlc_products_validated_by_fkey": { "name": "dlc_products_validated_by_fkey", "tableFrom": "dlc_products", "tableTo": "users", "schemaTo": "public", "columnsFrom": [ "validated_by" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "dlc_products_group_id_fkey": { "name": "dlc_products_group_id_fkey", "tableFrom": "dlc_products", "tableTo": "groups", "schemaTo": "public", "columnsFrom": [ "group_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "dlc_products_created_by_fkey": { "name": "dlc_products_created_by_fkey", "tableFrom": "dlc_products", "tableTo": "users", "schemaTo": "public", "columnsFrom": [ "created_by" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": { "dlc_products_date_type_check": { "name": "dlc_products_date_type_check", "value": "(date_type)::text = ANY ((ARRAY['dlc'::character varying, 'ddm'::character varying, 'dluo'::character varying])::text[])" }, "dlc_products_status_check": { "name": "dlc_products_status_check", "value": "(status)::text = ANY ((ARRAY['en_cours'::character varying, 'expires_soon'::character varying, 'expires'::character varying, 'valides'::character varying])::text[])" } }, "policies": {}, "isRLSEnabled": false }, "public.tasks": { "name": "tasks", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "title": { "name": "title", "type": "text", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "default": "'pending'" }, "priority": { "name": "priority", "type": "text", "primaryKey": false, "notNull": true, "default": "'medium'" }, "due_date": { "name": "due_date", "type": "timestamp", "primaryKey": false, "notNull": false }, "group_id": { "name": "group_id", "type": "integer", "primaryKey": false, "notNull": true }, "created_by": { "name": "created_by", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "CURRENT_TIMESTAMP" }, "updated_at": { "name": "updated_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "CURRENT_TIMESTAMP" }, "completed_at": { "name": "completed_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "assigned_to": { "name": "assigned_to", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "completed_by": { "name": "completed_by", "type": "varchar(255)", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "tasks_completed_by_fkey": { "name": "tasks_completed_by_fkey", "tableFrom": "tasks", "tableTo": "users", "schemaTo": "public", "columnsFrom": [ "completed_by" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "tasks_group_id_fkey": { "name": "tasks_group_id_fkey", "tableFrom": "tasks", "tableTo": "groups", "schemaTo": "public", "columnsFrom": [ "group_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "tasks_created_by_fkey": { "name": "tasks_created_by_fkey", "tableFrom": "tasks", "tableTo": "users", "schemaTo": "public", "columnsFrom": [ "created_by" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": { "tasks_status_check": { "name": "tasks_status_check", "value": "status = ANY (ARRAY['pending'::text, 'in_progress'::text, 'completed'::text, 'cancelled'::text])" }, "tasks_priority_check": { "name": "tasks_priority_check", "value": "priority = ANY (ARRAY['low'::text, 'medium'::text, 'high'::text, 'urgent'::text])" } }, "policies": {}, "isRLSEnabled": false }, "public.publicity_participations": { "name": "publicity_participations", "schema": "", "columns": { "publicity_id": { "name": "publicity_id", "type": "integer", "primaryKey": false, "notNull": true }, "group_id": { "name": "group_id", "type": "integer", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "CURRENT_TIMESTAMP" } }, "indexes": {}, "foreignKeys": { "publicity_participations_publicity_id_fkey": { "name": "publicity_participations_publicity_id_fkey", "tableFrom": "publicity_participations", "tableTo": "publicities", "schemaTo": "public", "columnsFrom": [ "publicity_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "publicity_participations_group_id_fkey": { "name": "publicity_participations_group_id_fkey", "tableFrom": "publicity_participations", "tableTo": "groups", "schemaTo": "public", "columnsFrom": [ "group_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "publicity_participations_pkey": { "name": "publicity_participations_pkey", "columns": [ "publicity_id", "group_id" ] } }, "uniqueConstraints": {}, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.role_permissions": { "name": "role_permissions", "schema": "", "columns": { "role_id": { "name": "role_id", "type": "integer", "primaryKey": false, "notNull": true }, "permission_id": { "name": "permission_id", "type": "integer", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "CURRENT_TIMESTAMP" } }, "indexes": { "idx_role_permissions_permission_id": { "name": "idx_role_permissions_permission_id", "columns": [ { "expression": "permission_id", "asc": true, "nulls": "last", "opclass": "int4_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "idx_role_permissions_role_id": { "name": "idx_role_permissions_role_id", "columns": [ { "expression": "role_id", "asc": true, "nulls": "last", "opclass": "int4_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "role_permissions_role_id_fkey": { "name": "role_permissions_role_id_fkey", "tableFrom": "role_permissions", "tableTo": "roles", "schemaTo": "public", "columnsFrom": [ "role_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "role_permissions_permission_id_fkey": { "name": "role_permissions_permission_id_fkey", "tableFrom": "role_permissions", "tableTo": "permissions", "schemaTo": "public", "columnsFrom": [ "permission_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "role_permissions_pkey": { "name": "role_permissions_pkey", "columns": [ "role_id", "permission_id" ] } }, "uniqueConstraints": {}, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false }, "public.user_roles": { "name": "user_roles", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "varchar(255)", "primaryKey": false, "notNull": true }, "role_id": { "name": "role_id", "type": "integer", "primaryKey": false, "notNull": true }, "assigned_by": { "name": "assigned_by", "type": "varchar(255)", "primaryKey": false, "notNull": true }, "assigned_at": { "name": "assigned_at", "type": "timestamp", "primaryKey": false, "notNull": false, "default": "CURRENT_TIMESTAMP" } }, "indexes": { "idx_user_roles_assigned_by": { "name": "idx_user_roles_assigned_by", "columns": [ { "expression": "assigned_by", "asc": true, "nulls": "last", "opclass": "text_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "idx_user_roles_role_id": { "name": "idx_user_roles_role_id", "columns": [ { "expression": "role_id", "asc": true, "nulls": "last", "opclass": "int4_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "idx_user_roles_user_id": { "name": "idx_user_roles_user_id", "columns": [ { "expression": "user_id", "asc": true, "nulls": "last", "opclass": "text_ops", "isExpression": false } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "user_roles_user_id_fkey": { "name": "user_roles_user_id_fkey", "tableFrom": "user_roles", "tableTo": "users", "schemaTo": "public", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "user_roles_role_id_fkey": { "name": "user_roles_role_id_fkey", "tableFrom": "user_roles", "tableTo": "roles", "schemaTo": "public", "columnsFrom": [ "role_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "user_roles_pkey": { "name": "user_roles_pkey", "columns": [ "user_id", "role_id" ] } }, "uniqueConstraints": {}, "checkConstraints": {}, "policies": {}, "isRLSEnabled": false } }, "enums": {}, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} }, "internal": { "tables": {} } }