fix(mysql): fix domain_expiry migration for MySQL 8.0 compatibility (#6612)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: CommanderStorm <26258709+CommanderStorm@users.noreply.github.com>pull/6614/head^2
parent
8d11807f77
commit
82c6b364af
@ -0,0 +1,14 @@
|
||||
// Ensure domain column is VARCHAR(255) across all database types.
|
||||
// This migration ensures MySQL, SQLite, and MariaDB have consistent column type,
|
||||
// even if a user installed 2.1.0-beta.0 or 2.1.0-beta.1 which had TEXT type for this column.
|
||||
// Maximum domain name length is 253 characters (255 octets on the wire).
|
||||
// Note: The unique constraint is already present from the original migration.
|
||||
exports.up = function (knex) {
|
||||
return knex.schema.alterTable("domain_expiry", function (table) {
|
||||
table.string("domain", 255).notNullable().alter();
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function (knex) {
|
||||
// No rollback needed - keeping VARCHAR(255) is the correct state
|
||||
};
|
||||
Loading…
Reference in new issue