diff options
Diffstat (limited to 'src/post/sql.go')
-rw-r--r-- | src/post/sql.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/post/sql.go b/src/post/sql.go index c768c9a..786ea63 100644 --- a/src/post/sql.go +++ b/src/post/sql.go @@ -52,6 +52,20 @@ var migrations = &migrate.MemoryMigrationSource{Migrations: []*migrate.Migration )`, }, }, + { + Id: "3", + Up: []string{ + `ALTER TABLE post_drafts RENAME description TO description_old`, + `ALTER TABLE post_drafts ADD COLUMN description TEXT`, + `UPDATE post_drafts AS pd SET description=pd.description_old`, + `ALTER TABLE post_drafts DROP COLUMN description_old`, + + `ALTER TABLE posts RENAME description TO description_old`, + `ALTER TABLE posts ADD COLUMN description TEXT`, + `UPDATE posts AS p SET description=p.description_old`, + `ALTER TABLE posts DROP COLUMN description_old`, + }, + }, }} // SQLDB is a sqlite3 database which can be used by storage interfaces within |