Initializes PostgreSQL database with tables for users, tasks, sessions, and AI interactions. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ff0be73b-afdd-4747-978b-bb8301fb0a82 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/9777c70b-fc38-4831-8d6b-78dfffe041b0/7930aad1-3044-457e-b465-8c9b7c2af1b9.jpg
784 lines
19 KiB
JSON
784 lines
19 KiB
JSON
{
|
|
"id": "a32565e4-aac3-44e2-9920-3d292a9e1002",
|
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.ai_interactions": {
|
|
"name": "ai_interactions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"prompt": {
|
|
"name": "prompt",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"response": {
|
|
"name": "response",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"model_used": {
|
|
"name": "model_used",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"processing_time": {
|
|
"name": "processing_time",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"was_spoken": {
|
|
"name": "was_spoken",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"ai_interactions_user_id_users_id_fk": {
|
|
"name": "ai_interactions_user_id_users_id_fk",
|
|
"tableFrom": "ai_interactions",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.financial_records": {
|
|
"name": "financial_records",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "varchar(10)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"amount": {
|
|
"name": "amount",
|
|
"type": "numeric(12, 2)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"category": {
|
|
"name": "category",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"date": {
|
|
"name": "date",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_via_voice": {
|
|
"name": "created_via_voice",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": false
|
|
},
|
|
"voice_transcription": {
|
|
"name": "voice_transcription",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"metadata": {
|
|
"name": "metadata",
|
|
"type": "json",
|
|
"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()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"financial_records_user_id_users_id_fk": {
|
|
"name": "financial_records_user_id_users_id_fk",
|
|
"tableFrom": "financial_records",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.sessions": {
|
|
"name": "sessions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"sessions_user_id_users_id_fk": {
|
|
"name": "sessions_user_id_users_id_fk",
|
|
"tableFrom": "sessions",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"sessions_token_unique": {
|
|
"name": "sessions_token_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"token"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.tasks": {
|
|
"name": "tasks",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"priority": {
|
|
"name": "priority",
|
|
"type": "varchar(10)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'medium'"
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'pending'"
|
|
},
|
|
"due_date": {
|
|
"name": "due_date",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"completed_at": {
|
|
"name": "completed_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_via_voice": {
|
|
"name": "created_via_voice",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": false
|
|
},
|
|
"voice_transcription": {
|
|
"name": "voice_transcription",
|
|
"type": "text",
|
|
"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()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"tasks_user_id_users_id_fk": {
|
|
"name": "tasks_user_id_users_id_fk",
|
|
"tableFrom": "tasks",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.user_preferences": {
|
|
"name": "user_preferences",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"theme": {
|
|
"name": "theme",
|
|
"type": "varchar(10)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'light'"
|
|
},
|
|
"language": {
|
|
"name": "language",
|
|
"type": "varchar(10)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'en'"
|
|
},
|
|
"voice_model": {
|
|
"name": "voice_model",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'base'"
|
|
},
|
|
"tts_voice": {
|
|
"name": "tts_voice",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'default'"
|
|
},
|
|
"notifications": {
|
|
"name": "notifications",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"dashboard_layout": {
|
|
"name": "dashboard_layout",
|
|
"type": "json",
|
|
"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()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"user_preferences_user_id_users_id_fk": {
|
|
"name": "user_preferences_user_id_users_id_fk",
|
|
"tableFrom": "user_preferences",
|
|
"tableTo": "users",
|
|
"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.users": {
|
|
"name": "users",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"username": {
|
|
"name": "username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"password": {
|
|
"name": "password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'standard'"
|
|
},
|
|
"first_name": {
|
|
"name": "first_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"last_name": {
|
|
"name": "last_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"onboarding_complete": {
|
|
"name": "onboarding_complete",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": false
|
|
},
|
|
"voice_enabled": {
|
|
"name": "voice_enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": true
|
|
},
|
|
"tts_enabled": {
|
|
"name": "tts_enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": true
|
|
},
|
|
"is_professional": {
|
|
"name": "is_professional",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"professional_type": {
|
|
"name": "professional_type",
|
|
"type": "professional_type",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"business_name": {
|
|
"name": "business_name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"bio": {
|
|
"name": "bio",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"specializations": {
|
|
"name": "specializations",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"phone_number": {
|
|
"name": "phone_number",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"address": {
|
|
"name": "address",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"is_public_profile": {
|
|
"name": "is_public_profile",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"allow_appointment_booking": {
|
|
"name": "allow_appointment_booking",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"profile_image_url": {
|
|
"name": "profile_image_url",
|
|
"type": "varchar(500)",
|
|
"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()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"users_username_unique": {
|
|
"name": "users_username_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"username"
|
|
]
|
|
},
|
|
"users_email_unique": {
|
|
"name": "users_email_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"email"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.voice_commands": {
|
|
"name": "voice_commands",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"command": {
|
|
"name": "command",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"transcription": {
|
|
"name": "transcription",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"intent": {
|
|
"name": "intent",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"confidence": {
|
|
"name": "confidence",
|
|
"type": "numeric(5, 4)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"processing_time": {
|
|
"name": "processing_time",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"successful": {
|
|
"name": "successful",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": true
|
|
},
|
|
"error_message": {
|
|
"name": "error_message",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"voice_commands_user_id_users_id_fk": {
|
|
"name": "voice_commands_user_id_users_id_fk",
|
|
"tableFrom": "voice_commands",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {
|
|
"public.appointment_status": {
|
|
"name": "appointment_status",
|
|
"schema": "public",
|
|
"values": [
|
|
"pending",
|
|
"confirmed",
|
|
"cancelled",
|
|
"completed",
|
|
"no_show"
|
|
]
|
|
},
|
|
"public.connection_status": {
|
|
"name": "connection_status",
|
|
"schema": "public",
|
|
"values": [
|
|
"pending",
|
|
"accepted",
|
|
"blocked"
|
|
]
|
|
},
|
|
"public.day_of_week": {
|
|
"name": "day_of_week",
|
|
"schema": "public",
|
|
"values": [
|
|
"monday",
|
|
"tuesday",
|
|
"wednesday",
|
|
"thursday",
|
|
"friday",
|
|
"saturday",
|
|
"sunday"
|
|
]
|
|
},
|
|
"public.professional_type": {
|
|
"name": "professional_type",
|
|
"schema": "public",
|
|
"values": [
|
|
"doctor",
|
|
"dentist",
|
|
"therapist",
|
|
"consultant",
|
|
"lawyer",
|
|
"accountant",
|
|
"coach",
|
|
"tutor",
|
|
"other"
|
|
]
|
|
}
|
|
},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |