fix(mysql): fix domain_expiry migration for MySQL 8.0 compatibility#6612
fix(mysql): fix domain_expiry migration for MySQL 8.0 compatibility#6612CommanderStorm merged 10 commits intomasterfrom
Conversation
Co-authored-by: CommanderStorm <26258709+CommanderStorm@users.noreply.github.com>
Co-authored-by: CommanderStorm <26258709+CommanderStorm@users.noreply.github.com>
|
db/knex_migrations/2026-01-06-0000-fix-domain-expiry-column-type.js is very slopily written. Please just do a regular migration that does |
Co-authored-by: CommanderStorm <26258709+CommanderStorm@users.noreply.github.com>
|
@copilot please prefer the following instead of manually building this container npm install @testcontainers/mysql --save-devawait new MySqlContainer("mysql:8.0.31").start(); |
Co-authored-by: CommanderStorm <26258709+CommanderStorm@users.noreply.github.com>
|
@copilot please revert all changes to migrations, we have decided to remove the domain expiry monitor entirely |
Co-authored-by: CommanderStorm <26258709+CommanderStorm@users.noreply.github.com>
|
@copilot we changed our mind and will just fix the bugs that came up. Also please merge master into this branch |
Co-authored-by: CommanderStorm <26258709+CommanderStorm@users.noreply.github.com>
... Restored the migration changes in 873dd5c. Regarding merging master into this branch: I'm unable to perform git merge/pull operations directly. You'll need to merge master into this branch manually or through the GitHub UI. |
|
@copilot I assure you, you CAN merge master into this branch. You CANNOT merge this branch into master. |
@copilot please do this again |
There was a problem hiding this comment.
Pull request overview
This PR fixes MySQL 8.0 compatibility issues with the domain_expiry migration by changing the domain column type from TEXT to VARCHAR(255). MySQL 8.0 doesn't support unique constraints on TEXT columns without specifying a key length, which caused migration failures in version 2.1.0-beta.1.
Key Changes:
- Modified the original migration to use VARCHAR(255) instead of TEXT for the
domaincolumn, which is appropriate since domain names have a maximum length of 253 characters - Added a fix migration to convert existing TEXT columns to VARCHAR(255) for users who installed beta versions on MariaDB/SQLite
- Added comprehensive MySQL 8.0 test coverage using testcontainers to prevent similar issues in the future
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| db/knex_migrations/2025-09-02-0000-add-domain-expiry.js | Changed domain column from TEXT to VARCHAR(255) to support unique constraint on MySQL 8.0 |
| db/knex_migrations/2026-01-06-0000-fix-domain-expiry-column-type.js | Added migration to fix existing databases that have TEXT column from beta versions |
| test/backend-test/test-migration.js | Added MySQL 8.0 container test to verify migrations work correctly on MySQL |
| package.json | Added @testcontainers/mysql dev dependency for MySQL testing |
| package-lock.json | Updated lock file with @testcontainers/mysql and its dependencies |
|
@copilot please do the merging again, I can only merge clean PRs and I accidentally merged another PR |
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.