🎯 Merge Request Overview#96
Merged
Merged
Conversation
- Change field names from 'flatd_2d'/'flatd_3d' to 'flat_2d'/'flat_3d' for consistency - Remove leading '/flags/' prefix from image paths and country emojis - Update country names and add new entries (e.g., aland, d_r_congo, western_sahara) - Reorder and adjust country list sequence, increasing total from 247 to 250 entries
- Add new 'data_flags' table for storing country flag information - Add new 'geo_cities' table with proper foreign key constraints - Rename 'geo_sub_divisions' table to 'geo_divisions' across all references - Remove 'surface_area' column from 'geo_countries' table - Update Sequelize config path from 'index.js' to 'sequelize.config.js' - Add placeholder seeder for country-language relationships - Update CHANGELOG.md to reflect table name changes
- Populate geo_countries_has_languages table with 291 country-language relationships - Implement batch insertion for better performance during seeding - Include proper up/down migration methods for data integrity - Add sequelize Op dependency for bulk delete operations - Mark principal languages for each country relationship
- Remove 'surface_area' column from geo_continents migration and seeder - Refactor seeders to use direct data arrays instead of get() methods - Add down migration methods with Op.or conditions for proper rollback - Include sequelize Op dependency for bulk delete operations - Update seeders for continents, dial codes, and country-currencies
Refactor seeders to use direct data arrays instead of get() methods
Add seed data for default roles (admin, technical_support, customer) including security levels and target assignments.
- Rename `geo_divisions` table to `geo_political_divisions` - Remove and re-add foreign key constraints for capitals - Fix seeder table references - Remove unused endpoints/pages scope junction tables - Update seeders to use `updateOnDuplicate` BREAKING CHANGE: `geo_divisions` table renamed to `geo_political_divisions`. Update queries and models accordingly.
Add the 0.Project_info folder to the biome.json ignore list to prevent linting on project documentation files.
Re-create config_endpoints_has_required_scopes and config_pages_has_required_scopes tables. Move scope foreign key constraints from junction tables to the scopes table migration. Remove duplicate constraint from roles-scopes table.
- Add logs_http_requests table to track HTTP requests, responses, and errors. - Includes foreign keys to accesses, pages, and endpoints. - Implements table partitioning by date for performance.
- Move foreign key constraints to parent table migrations for better organization.
- Remove duplicate create-cities migration and data_types_identification table.
- Add currencies table migration and run-migrations script.
- Update TINYTEXT columns to TEXT('tiny') for compatibility.
- Add npm script 'migrate' for running migrations with Vault credentials.
- Move foreign key constraints to parent table migrations for better organization.
- Remove duplicate create-cities migration and data_types_identification table.
- Add currencies table migration and run-migrations script.
- Update TINYTEXT columns to TEXT('tiny') for compatibility.
- Add npm script 'migrate' for running migrations with Vault credentials.
- Change Sequelize.DATE to 'TIMESTAMP' for better MySQL compatibility. - Remove temporary sequelize config file and table partitioning from logs. - Move user foreign key constraint to users table migration. - Fix flag index names to indicate uniqueness consistently.
- Add temporary sequelize config and run-seeders script. - Create npm scripts: 'seed', 'migrate:undo', and 'db:setup' for database management. - Change political divisions name column to JSON for multilingual support. - Convert country abbreviation to JSON string in seed data. - Add updateOnDuplicate options to seeder for better idempotency. - Remove geonameId comment from divisions seeder.
- Remove temporary sequelize config file after migration script improvements. - Update languages seeder: rename 'id_flag' to 'flag_id' and 'public' to 'is_public'. - Fix roles seeder: correct security_level_id values and insert array format. - Clean up column names for consistency with database schema.
Update migration and seeder scripts to use the database name from Vault secrets instead of hardcoded 'test_base' value.
DiegoAlejandroNino
previously approved these changes
Jan 28, 2026
Auto-generated by GitHub Actions workflow PR: #96 Workflow: Auto Version & Changelog Run ID: 21458401750
|
🚀 Auto-versioning complete! 📦 New version:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This comprehensive database refactor implements a complete overhaul of the migration and seeding system, standardizes database schema conventions, and introduces production-ready database management tooling. The changes establish a robust foundation for internationalization, improve data integrity through proper foreign key management, and automate database setup processes.
📋 Changes Summary
Type: Feature, Refactor, Bugfix
Scope: Database migrations, seeders, configuration, and tooling
Breaking: Yes - Includes table renaming and column type changes
🔄 What's Changed
Added:
db:setup,migrate:undo,seed)Modified:
Sequelize.DATEtoTIMESTAMPgeo_divisions→geo_political_divisionstableupdateOnDuplicateFixed:
id_flag→flag_id)Removed:
data_types_identificationtable migrationcreate-cities-tablemigration🏗️ Implementation Details
Architecture Changes
Key Components Modified
migrations/- Complete overhaul of 20+ migration files with standardized conventionsseeders/- Updated all seed data with JSON structures and idempotent insertionscripts/run-migrations.script.js- Vault-integrated migration runner with proper error handlingscripts/run-seeders.script.js- Parallel seeder script with the same security standardspackage.json- Addeddb:setup,migrate:undo, andseednpm scriptsconfig/- Removed temporary configuration files after script improvementsDependencies
xml2jsfor XML parsing🧪 Quality Assurance
Testing Strategy
Testing Instructions
📊 Performance Impact
Metrics:
🔒 Security Considerations
Security Enhancements:
🚀 Deployment Notes
Pre-deployment Requirements
dbpathPost-deployment Actions
SHOW TABLES;SHOW CREATE TABLEon key tablesRollback Plan
🔗 Related Work
0.Project_info/✅ Definition of Done
👥 Review Assignment
Required Reviewers
Optional Reviewers
📝 Additional Context
Known Issues/Limitations
birth_datecolumn changed fromDATEONLYtoTIMESTAMP- requires application code updatesFuture Improvements
Critical Changes Requiring Attention
geo_divisionstable renamed togeo_political_divisionsbirth_datecolumn type changed (requires code updates)TIMESTAMPMigration Path: Run
npm run db:setupon development first, then coordinate application code updates before production deployment.