From 8f3275ee404d016dc4f99213db1ab320e90cd91d Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Thu, 25 Jan 2024 11:40:18 +0200 Subject: [PATCH] chore: change users image_url column to text (#6031) Change the image_url column to text Closes # https://github.com/orgs/Unleash/projects/8/views/1?pane=issue&itemId=51021534 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, + ); +};