- Add migration 021_location_hierarchy.sql with new table structure
- Add location-loader.js seeder to import SQL dumps
- Update all seeder files to use country_id instead of region_id
- Rename companies.region_id to country_id
- applications.js: remove UUID id, let DB auto-generate SERIAL
- fictional-companies.js: fix Los Pollos and Springfield to use slug instead of UUID
- fictional-companies.js: fix all VALUES 7 to 6 (16 columns)
- epic-companies.js: fix VALUES 7 to 6
Migration 009:
- Simplified uuid_generate_v7() to avoid integer overflow on bit shifts
- Uses double precision for timestamp then converts to hex
Seeder:
- Changed roles from 'admin','company' to 'companyAdmin'
- Matches users table CHECK constraint: superadmin, companyAdmin, recruiter, jobSeeker
- Create docs/API.md with complete API reference
- 40+ routes documented
- Permission matrix by role
- Module breakdown (Auth, Users, Jobs, Applications, etc.)
- Error response examples
- ID format documentation
- Fix seeders to use SERIAL (not UUID) for jobs.id
- jobs.js: let DB auto-generate id
- acme.js, fictional-companies.js, epic-companies.js: same fix
- Update README.md with API documentation link
Migrations:
- Fix 010_seed_super_admin.sql: only use columns from migration 001
- Add 021_create_uuid_v7_function.sql: PostgreSQL uuid_generate_v7() function
- Add 022_migrate_to_uuid_v7.sql: update notifications, tickets, job_payments to use v7
Seeder:
- Create seeder-api/src/utils/uuid.js with uuidv7() function
- Update notifications.js to use uuidv7() instead of randomUUID()
Docs:
- Update DATABASE.md with UUID v7 section and benefits
UUID v7 benefits:
- Time-ordered (sortable by creation time)
- Better index performance than v4
- RFC 9562 compliant
BREAKING CHANGE: Removed core_companies, core_users, core_user_roles tables
Migrations:
- Create 020_unify_schema.sql: adds tenant_id, email, name to users table
- Create user_roles table (replaces core_user_roles)
- Disable 009_create_core_tables.sql (renamed to .disabled)
- Update 010_seed_super_admin.sql to use unified tables
Backend Repositories:
- company_repository.go: use companies table with INT id
- user_repository.go: use users/user_roles with INT id conversion
Seeders:
- All seeders now use companies/users/user_roles tables
- Removed all core_* table insertions
- Query companies by slug to get SERIAL id
This eliminates the redundancy between core_* and legacy tables.
- jobs.company_id is INT referencing companies.id (SERIAL)
- jobs.created_by is INT referencing users.id (SERIAL)
- Was incorrectly querying core_companies/core_users (UUID)
- Add JWT auth guard with Bearer token and cookie support
- Update .env.example files with PASSWORD_PEPPER documentation
- Update seeder to use PASSWORD_PEPPER for password hashing
- Update seeder README with hash verification examples
- Fix frontend auth and page components
- Update backend JWT service and seed migration
- jobs.company_id now references core_companies.id (UUID)
- jobs.created_by now references core_users.id (UUID)
- Fixed parameter count in all INSERT statements
- All 13 fictional companies now seed correctly
🛒 Buy n Large (Wall-E) - 3 jobs
🤖 Cyberdyne Systems (Terminator) - 3 jobs
🍫 Wonka Industries (Chocolate Factory) - 3 jobs
🦇 Wayne Enterprises (Batman) - 3 jobs
✈️ Oceanic Airlines (Lost) - 3 jobs
🦖 InGen Jurassic Park - 3 jobs
🦐 Bubba Gump Shrimp Co. (Forrest Gump) - 3 jobs
☣️ Umbrella Corporation (Resident Evil) - 3 jobs
🏪 Sprawl-Mart (Dystopian Parody) - 30 hilarious jobs
Total: 43 companies, 1129+ jobs
The ultimate job board parody collection!
🏭 ACME Corp - Fornecedora Oficial do Coiote desde 1949
- Added acme.js seeder with 69 creative job postings
- Jobs include: Dev de TNT Inteligente, ML Engineer de Detecção de Papa-Léguas, Chief Explosion Officer, etc.
- Added Wile E. Coyote user (wile_e_coyote / MeepMeep@123)
- Updated README with ACME documentation
- Integrated ACME seeder into main flow
'Se não explodir, não é ACME!' ™
- frontend/.env.example: Add SEEDER_API_URL
- seeder-api/.env.example: Expand with server config and backend URL
- job-scraper-multisite/.env.example: New file with scraping config
- Update gitignore files to allow .env.example tracking
- Add SSL configuration to database pool supporting DB_SSLMODE=require
- Fix user seeder FK violations by using RETURNING clause to get actual IDs
- Update all user creation queries (superadmin, company admins, candidates)
- Ensure correct user_id references when ON CONFLICT DO UPDATE occurs
This fixes the seeder hanging issue and foreign key constraint violations
that were preventing successful database population.