This commit is contained in:
Christoph Kluge 2023-06-29 14:59:54 +02:00
commit b6be76eb07
5 changed files with 11 additions and 1 deletions

View File

@ -16,7 +16,7 @@ import (
"github.com/golang-migrate/migrate/v4/source/iofs" "github.com/golang-migrate/migrate/v4/source/iofs"
) )
const Version uint = 5 const Version uint = 6
//go:embed migrations/* //go:embed migrations/*
var migrationFiles embed.FS var migrationFiles embed.FS

View File

@ -0,0 +1 @@
ALTER TABLE configuration MODIFY value VARCHAR(255);

View File

@ -0,0 +1 @@
ALTER TABLE configuration MODIFY value TEXT;

View File

@ -0,0 +1,4 @@
ALTER TABLE configuration ADD COLUMN value_new varchar(255);
INSERT INTO configuration (value_new) SELECT value FROM configuration;
ALTER TABLE configuration DROP COLUMN value;
ALTER TABLE configuration RENAME COLUMN value_new TO value;

View File

@ -0,0 +1,4 @@
ALTER TABLE configuration ADD COLUMN value_new TEXT;
INSERT INTO configuration (value_new) SELECT value FROM configuration;
ALTER TABLE configuration DROP COLUMN value;
ALTER TABLE configuration RENAME COLUMN value_new TO value;