Skip to content

Commit

Permalink
fix mysql migration
Browse files Browse the repository at this point in the history
  • Loading branch information
ShireenMissi committed Oct 23, 2024
1 parent 10ca6ee commit 1910089
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ export class UpdateProcessedDataValueColumnToText1729607673464 implements Revers
await runQuery(`ALTER TABLE ${prefixedTableName} DROP COLUMN value;`);

if (isMysql) {
await runQuery(
`ALTER TABLE ${processedDataTableName} CHANGE value_temp value TEXT NOT NULL;`,
);
await runQuery(`ALTER TABLE ${prefixedTableName} CHANGE value_temp value TEXT NOT NULL;`);
} else {
await runQuery(`ALTER TABLE ${prefixedTableName} RENAME COLUMN value_temp TO value`);
await addNotNull(processedDataTableName, 'value');
Expand All @@ -26,7 +24,7 @@ export class UpdateProcessedDataValueColumnToText1729607673464 implements Revers

if (isMysql) {
await runQuery(
`ALTER TABLE ${processedDataTableName} CHANGE value_temp value VARCHAR(255) NOT NULL;`,
`ALTER TABLE ${prefixedTableName} CHANGE value_temp value VARCHAR(255) NOT NULL;`,
);
} else {
await runQuery(`ALTER TABLE ${prefixedTableName} RENAME COLUMN value_temp TO value`);
Expand Down

0 comments on commit 1910089

Please sign in to comment.