From dbf554bce21444c8b4486039e61958e611c16af9 Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Thu, 25 Jan 2024 11:05:37 +0200 Subject: [PATCH] chore: change users image_url column to text Signed-off-by: andreas-unleash --- ...5703-users-table-increae-image-url-size.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/migrations/20240125085703-users-table-increae-image-url-size.js diff --git a/src/migrations/20240125085703-users-table-increae-image-url-size.js b/src/migrations/20240125085703-users-table-increae-image-url-size.js new file mode 100644 index 000000000000..6c521d28fe8e --- /dev/null +++ b/src/migrations/20240125085703-users-table-increae-image-url-size.js @@ -0,0 +1,19 @@ +exports.up = function (db, cb) { + db.runSql( + ` + ALTER TABLE users + ALTER COLUMN image_url TYPE text; + `, + cb, + ); +}; + +exports.down = function (db, cb) { + db.runSql( + ` + ALTER TABLE users + ALTER COLUMN image_url TYPE VARCHAR(255); + `, + cb, + ); +};