546 lines
21 KiB
SQL
546 lines
21 KiB
SQL
-- MySQL dump 10.13 Distrib 8.0.42, for Linux (x86_64)
|
|
--
|
|
-- Host: 34.67.180.54 Database: user_profile_db
|
|
-- ------------------------------------------------------
|
|
-- Server version 8.0.40-google
|
|
|
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
|
/*!50503 SET NAMES utf8mb4 */;
|
|
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
|
/*!40103 SET TIME_ZONE='+00:00' */;
|
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
|
SET @MYSQLDUMP_TEMP_LOG_BIN = @@SESSION.SQL_LOG_BIN;
|
|
SET @@SESSION.SQL_LOG_BIN= 0;
|
|
|
|
--
|
|
-- GTID state at the beginning of the backup
|
|
--
|
|
|
|
SET @@GLOBAL.GTID_PURGED=/*!80000 '+'*/ '';
|
|
|
|
--
|
|
-- Table structure for table `ai_chat_messages`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `ai_chat_messages`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `ai_chat_messages` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
|
`thread_id` char(36) NOT NULL,
|
|
`user_id` bigint NOT NULL,
|
|
`role` enum('user','assistant','system') NOT NULL,
|
|
`content` mediumtext NOT NULL,
|
|
`meta_json` json DEFAULT NULL,
|
|
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`),
|
|
KEY `thread_id` (`thread_id`,`created_at`),
|
|
CONSTRAINT `fk_chat_thread` FOREIGN KEY (`thread_id`) REFERENCES `ai_chat_threads` (`id`) ON DELETE CASCADE,
|
|
CONSTRAINT `fk_messages_thread` FOREIGN KEY (`thread_id`) REFERENCES `ai_chat_threads` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `ai_chat_threads`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `ai_chat_threads`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `ai_chat_threads` (
|
|
`id` char(36) NOT NULL,
|
|
`user_id` bigint NOT NULL,
|
|
`bot_type` enum('support','retire','coach') NOT NULL,
|
|
`title` varchar(200) DEFAULT NULL,
|
|
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`),
|
|
KEY `user_id` (`user_id`,`bot_type`,`updated_at`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `ai_generated_ksa`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `ai_generated_ksa`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `ai_generated_ksa` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`soc_code` varchar(50) NOT NULL,
|
|
`career_title` varchar(255) NOT NULL,
|
|
`knowledge_json` mediumtext,
|
|
`skills_json` mediumtext,
|
|
`abilities_json` mediumtext,
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `soc_code` (`soc_code`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `ai_risk_analysis`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `ai_risk_analysis`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `ai_risk_analysis` (
|
|
`soc_code` varchar(10) NOT NULL,
|
|
`career_name` text,
|
|
`job_description` text,
|
|
`tasks` text,
|
|
`risk_level` varchar(50) DEFAULT NULL,
|
|
`reasoning` text,
|
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`soc_code`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `career_profiles`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `career_profiles`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `career_profiles` (
|
|
`id` varchar(36) NOT NULL,
|
|
`user_id` int NOT NULL,
|
|
`career_name` varchar(255) DEFAULT NULL,
|
|
`status` varchar(100) DEFAULT NULL,
|
|
`start_date` varchar(128) DEFAULT NULL,
|
|
`retirement_start_date` varchar(128) DEFAULT NULL,
|
|
`college_enrollment_status` varchar(100) DEFAULT NULL,
|
|
`currently_working` varchar(10) DEFAULT NULL,
|
|
`planned_monthly_expenses` varchar(128) DEFAULT NULL,
|
|
`planned_monthly_debt_payments` varchar(128) DEFAULT NULL,
|
|
`planned_monthly_retirement_contribution` varchar(128) DEFAULT NULL,
|
|
`planned_monthly_emergency_contribution` varchar(128) DEFAULT NULL,
|
|
`planned_surplus_emergency_pct` varchar(128) DEFAULT NULL,
|
|
`planned_surplus_retirement_pct` varchar(128) DEFAULT NULL,
|
|
`planned_additional_income` varchar(128) DEFAULT NULL,
|
|
`scenario_title` varchar(255) DEFAULT NULL,
|
|
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`career_goals` mediumtext,
|
|
`desired_retirement_income_monthly` varchar(128) DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `user_id` (`user_id`,`career_name`),
|
|
CONSTRAINT `fk_career_profiles_user` FOREIGN KEY (`user_id`) REFERENCES `user_profile` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `college_profiles`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `college_profiles`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `college_profiles` (
|
|
`id` varchar(36) NOT NULL,
|
|
`user_id` int NOT NULL,
|
|
`career_profile_id` varchar(36) DEFAULT NULL,
|
|
`selected_school` varchar(512) DEFAULT NULL,
|
|
`selected_program` varchar(512) DEFAULT NULL,
|
|
`program_type` varchar(50) DEFAULT NULL,
|
|
`academic_calendar` varchar(50) DEFAULT NULL,
|
|
`is_in_state` tinyint DEFAULT NULL,
|
|
`is_in_district` tinyint DEFAULT NULL,
|
|
`is_online` tinyint DEFAULT NULL,
|
|
`college_enrollment_status` varchar(50) DEFAULT NULL,
|
|
`annual_financial_aid` varchar(128) DEFAULT NULL,
|
|
`existing_college_debt` varchar(128) DEFAULT NULL,
|
|
`tuition` varchar(128) DEFAULT NULL,
|
|
`tuition_paid` varchar(128) DEFAULT NULL,
|
|
`loan_deferral_until_graduation` varchar(128) DEFAULT NULL,
|
|
`loan_term` varchar(128) DEFAULT NULL,
|
|
`interest_rate` varchar(128) DEFAULT NULL,
|
|
`extra_payment` varchar(128) DEFAULT NULL,
|
|
`credit_hours_per_year` decimal(5,2) DEFAULT NULL,
|
|
`hours_completed` decimal(5,1) DEFAULT NULL,
|
|
`program_length` decimal(5,2) DEFAULT NULL,
|
|
`credit_hours_required` decimal(5,2) DEFAULT NULL,
|
|
`expected_graduation` date DEFAULT NULL,
|
|
`expected_salary` varchar(128) DEFAULT NULL,
|
|
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`enrollment_date` date DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `ux_user_school_prog` (`user_id`,`career_profile_id`,`selected_school`(192),`selected_program`(192),`program_type`),
|
|
KEY `idx_school` (`selected_school`(191)),
|
|
KEY `idx_program` (`selected_program`(191)),
|
|
KEY `idx_school_prog` (`selected_school`(191),`selected_program`(191)),
|
|
KEY `idx_college_user` (`user_id`),
|
|
KEY `idx_college_career` (`career_profile_id`),
|
|
CONSTRAINT `fk_college_profiles_career` FOREIGN KEY (`career_profile_id`) REFERENCES `career_profiles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
CONSTRAINT `fk_college_profiles_user` FOREIGN KEY (`user_id`) REFERENCES `user_profile` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `context_cache`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `context_cache`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `context_cache` (
|
|
`user_id` bigint NOT NULL,
|
|
`career_profile_id` varchar(36) NOT NULL,
|
|
`ctx_hash` char(40) NOT NULL,
|
|
`ctx_text` mediumtext,
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`user_id`,`career_profile_id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `encryption_canary`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `encryption_canary`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `encryption_canary` (
|
|
`id` tinyint NOT NULL,
|
|
`value` text NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `financial_profiles`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `financial_profiles`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `financial_profiles` (
|
|
`user_id` int NOT NULL,
|
|
`current_salary` varchar(128) DEFAULT NULL,
|
|
`additional_income` varchar(128) DEFAULT NULL,
|
|
`monthly_expenses` varchar(128) DEFAULT NULL,
|
|
`monthly_debt_payments` varchar(128) DEFAULT NULL,
|
|
`retirement_savings` varchar(128) DEFAULT NULL,
|
|
`emergency_fund` varchar(128) DEFAULT NULL,
|
|
`retirement_contribution` varchar(128) DEFAULT NULL,
|
|
`emergency_contribution` varchar(128) DEFAULT NULL,
|
|
`extra_cash_emergency_pct` varchar(64) DEFAULT NULL,
|
|
`extra_cash_retirement_pct` varchar(64) DEFAULT NULL,
|
|
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`user_id`),
|
|
CONSTRAINT `fk_financial_profiles_user` FOREIGN KEY (`user_id`) REFERENCES `user_profile` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `financial_projections`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `financial_projections`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `financial_projections` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`user_id` int NOT NULL,
|
|
`career_profile_id` varchar(36) DEFAULT NULL,
|
|
`projection_data` text NOT NULL,
|
|
`loan_paid_off_month` varchar(20) DEFAULT NULL,
|
|
`final_emergency_savings` decimal(10,2) DEFAULT '0.00',
|
|
`final_retirement_savings` decimal(10,2) DEFAULT '0.00',
|
|
`final_loan_balance` decimal(10,2) DEFAULT '0.00',
|
|
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`),
|
|
KEY `fk_financial_projections_user` (`user_id`),
|
|
KEY `fk_financial_projections_career` (`career_profile_id`),
|
|
CONSTRAINT `fk_financial_projections_career` FOREIGN KEY (`career_profile_id`) REFERENCES `career_profiles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
CONSTRAINT `fk_financial_projections_user` FOREIGN KEY (`user_id`) REFERENCES `user_profile` (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `milestone_impacts`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `milestone_impacts`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `milestone_impacts` (
|
|
`id` varchar(36) NOT NULL,
|
|
`milestone_id` varchar(36) NOT NULL,
|
|
`impact_type` varchar(255) DEFAULT NULL,
|
|
`direction` varchar(255) DEFAULT NULL,
|
|
`amount` varchar(128) DEFAULT NULL,
|
|
`start_date` varchar(255) DEFAULT NULL,
|
|
`end_date` varchar(255) DEFAULT NULL,
|
|
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `milestones`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `milestones`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `milestones` (
|
|
`id` varchar(36) NOT NULL,
|
|
`user_id` int NOT NULL,
|
|
`title` varchar(255) DEFAULT NULL,
|
|
`description` mediumtext,
|
|
`date` varchar(128) DEFAULT NULL,
|
|
`progress` varchar(128) DEFAULT NULL,
|
|
`status` varchar(50) DEFAULT 'planned',
|
|
`career_profile_id` varchar(36) DEFAULT NULL,
|
|
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`is_universal` tinyint DEFAULT '0',
|
|
`origin_milestone_id` varchar(36) DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `fk_milestones_user` (`user_id`),
|
|
KEY `fk_milestones_career` (`career_profile_id`),
|
|
CONSTRAINT `fk_milestones_career` FOREIGN KEY (`career_profile_id`) REFERENCES `career_profiles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
CONSTRAINT `fk_milestones_user` FOREIGN KEY (`user_id`) REFERENCES `user_profile` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `onboarding_drafts`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `onboarding_drafts`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `onboarding_drafts` (
|
|
`user_id` bigint NOT NULL,
|
|
`id` char(36) NOT NULL,
|
|
`step` tinyint NOT NULL DEFAULT '0',
|
|
`data` json NOT NULL,
|
|
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`user_id`),
|
|
UNIQUE KEY `uniq_id` (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `password_resets`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `password_resets`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `password_resets` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`email` varchar(255) NOT NULL,
|
|
`token_hash` char(64) NOT NULL,
|
|
`expires_at` bigint NOT NULL,
|
|
`used_at` bigint DEFAULT NULL,
|
|
`created_at` bigint NOT NULL,
|
|
`ip` varchar(64) DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `email` (`email`),
|
|
KEY `token_hash` (`token_hash`),
|
|
KEY `expires_at` (`expires_at`),
|
|
KEY `idx_password_resets_token_hash` (`token_hash`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `reminders`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `reminders`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `reminders` (
|
|
`id` char(36) NOT NULL,
|
|
`user_id` int NOT NULL,
|
|
`phone_e164` varchar(128) DEFAULT NULL,
|
|
`message_body` mediumtext,
|
|
`send_at_utc` datetime NOT NULL,
|
|
`sent_at` datetime DEFAULT NULL,
|
|
`status` enum('pending','sent','failed') DEFAULT 'pending',
|
|
`twilio_sid` varchar(64) DEFAULT NULL,
|
|
`error_code` varchar(32) DEFAULT NULL,
|
|
`error_message` text,
|
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`),
|
|
KEY `fk_reminders_user` (`user_id`),
|
|
CONSTRAINT `fk_reminders_user` FOREIGN KEY (`user_id`) REFERENCES `user_profile` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `salary_data`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `salary_data`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `salary_data` (
|
|
`AREA` varchar(10) DEFAULT NULL,
|
|
`AREA_TITLE` varchar(255) DEFAULT NULL,
|
|
`AREA_TYPE` int DEFAULT NULL,
|
|
`PRIM_STATE` varchar(10) DEFAULT NULL,
|
|
`NAICS` varchar(10) DEFAULT NULL,
|
|
`NAICS_TITLE` varchar(255) DEFAULT NULL,
|
|
`I_GROUP` varchar(50) DEFAULT NULL,
|
|
`OWN_CODE` varchar(10) DEFAULT NULL,
|
|
`OCC_CODE` varchar(10) DEFAULT NULL,
|
|
`OCC_TITLE` varchar(255) DEFAULT NULL,
|
|
`O_GROUP` varchar(50) DEFAULT NULL,
|
|
`TOT_EMP` int DEFAULT NULL,
|
|
`EMP_PRSE` decimal(10,2) DEFAULT NULL,
|
|
`JOBS_1000` decimal(10,2) DEFAULT NULL,
|
|
`LOC_QUOTIENT` decimal(10,2) DEFAULT NULL,
|
|
`PCT_TOTAL` decimal(10,2) DEFAULT NULL,
|
|
`PCT_RPT` decimal(10,2) DEFAULT NULL,
|
|
`H_MEAN` decimal(10,2) DEFAULT NULL,
|
|
`A_MEAN` int DEFAULT NULL,
|
|
`MEAN_PRSE` decimal(10,2) DEFAULT NULL,
|
|
`H_PCT10` decimal(10,2) DEFAULT NULL,
|
|
`H_PCT25` decimal(10,2) DEFAULT NULL,
|
|
`H_MEDIAN` decimal(10,2) DEFAULT NULL,
|
|
`H_PCT75` decimal(10,2) DEFAULT NULL,
|
|
`H_PCT90` decimal(10,2) DEFAULT NULL,
|
|
`A_PCT10` int DEFAULT NULL,
|
|
`A_PCT25` int DEFAULT NULL,
|
|
`A_MEDIAN` int DEFAULT NULL,
|
|
`A_PCT75` int DEFAULT NULL,
|
|
`A_PCT90` int DEFAULT NULL,
|
|
`ANNUAL` tinyint(1) DEFAULT NULL,
|
|
`HOURLY` tinyint(1) DEFAULT NULL,
|
|
`JOB_ZONE` int DEFAULT NULL,
|
|
`limited_data` tinyint(1) DEFAULT '0'
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `stripe_events`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `stripe_events`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `stripe_events` (
|
|
`id` varchar(255) NOT NULL,
|
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `tasks`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `tasks`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `tasks` (
|
|
`id` varchar(36) NOT NULL,
|
|
`milestone_id` varchar(36) NOT NULL,
|
|
`user_id` int NOT NULL,
|
|
`title` varchar(255) DEFAULT NULL,
|
|
`description` mediumtext,
|
|
`due_date` varchar(255) DEFAULT NULL,
|
|
`status` varchar(255) DEFAULT 'not_started',
|
|
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`),
|
|
KEY `fk_tasks_user` (`user_id`),
|
|
CONSTRAINT `fk_tasks_user` FOREIGN KEY (`user_id`) REFERENCES `user_profile` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `user_auth`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `user_auth`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `user_auth` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`user_id` int NOT NULL,
|
|
`username` varchar(255) NOT NULL,
|
|
`hashed_password` text NOT NULL,
|
|
`password_changed_at` bigint unsigned DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `username` (`username`),
|
|
KEY `ix_user_auth_userid_changedat` (`user_id`,`password_changed_at`),
|
|
CONSTRAINT `fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `user_profile` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `user_profile`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `user_profile`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `user_profile` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`username` varchar(255) DEFAULT NULL,
|
|
`firstname` varchar(400) DEFAULT NULL,
|
|
`lastname` varchar(400) DEFAULT NULL,
|
|
`email` varchar(512) DEFAULT NULL,
|
|
`email_lookup` char(64) NOT NULL DEFAULT '',
|
|
`phone_e164` varchar(128) DEFAULT NULL,
|
|
`sms_opt_in` tinyint(1) NOT NULL DEFAULT '0',
|
|
`zipcode` varchar(64) DEFAULT NULL,
|
|
`state` varchar(50) NOT NULL,
|
|
`area` varchar(255) NOT NULL,
|
|
`is_premium` tinyint DEFAULT '0',
|
|
`is_pro_premium` tinyint DEFAULT '0',
|
|
`stripe_customer_id` varchar(128) DEFAULT NULL,
|
|
`career_situation` text,
|
|
`interest_inventory_answers` mediumtext,
|
|
`riasec_scores` varchar(768) DEFAULT NULL,
|
|
`resume_optimizations_used` int DEFAULT '0',
|
|
`resume_limit_reset` date DEFAULT NULL,
|
|
`resume_booster_count` int DEFAULT '0',
|
|
`career_priorities` mediumtext,
|
|
`career_list` mediumtext,
|
|
`stripe_customer_id_hash` char(64) DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `email` (`email`),
|
|
UNIQUE KEY `stripe_customer_id` (`stripe_customer_id`),
|
|
KEY `idx_customer_hash` (`stripe_customer_id_hash`),
|
|
KEY `idx_user_profile_email_lookup` (`email_lookup`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping events for database 'user_profile_db'
|
|
--
|
|
|
|
--
|
|
-- Dumping routines for database 'user_profile_db'
|
|
--
|
|
SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN;
|
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
|
|
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|
|
|
-- Dump completed on 2025-08-27 16:38:46
|