add database migration from blob to mediumblob (#4568)
This commit is contained in:
parent
252883f67e
commit
7d0a255a49
3 changed files with 8 additions and 3 deletions
5
servatrice/migrations/servatrice_0028_to_0029.sql
Normal file
5
servatrice/migrations/servatrice_0028_to_0029.sql
Normal file
|
@ -0,0 +1,5 @@
|
|||
-- Servatrice db migration from version 28 to version 29
|
||||
|
||||
ALTER TABLE cockatrice_users MODIFY COLUMN avatar_bmp mediumblob NOT NULL;
|
||||
|
||||
UPDATE cockatrice_schema_version SET version=29 WHERE version=28;
|
|
@ -20,7 +20,7 @@ CREATE TABLE IF NOT EXISTS `cockatrice_schema_version` (
|
|||
PRIMARY KEY (`version`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
INSERT INTO cockatrice_schema_version VALUES(28);
|
||||
INSERT INTO cockatrice_schema_version VALUES(29);
|
||||
|
||||
-- users and user data tables
|
||||
CREATE TABLE IF NOT EXISTS `cockatrice_users` (
|
||||
|
@ -31,7 +31,7 @@ CREATE TABLE IF NOT EXISTS `cockatrice_users` (
|
|||
`password_sha512` char(120) NOT NULL,
|
||||
`email` varchar(255) NOT NULL,
|
||||
`country` char(2) NOT NULL,
|
||||
`avatar_bmp` blob NOT NULL,
|
||||
`avatar_bmp` mediumblob NOT NULL,
|
||||
`registrationDate` datetime NOT NULL,
|
||||
`active` tinyint(1) NOT NULL,
|
||||
`token` binary(16),
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <QObject>
|
||||
#include <QSqlDatabase>
|
||||
|
||||
#define DATABASE_SCHEMA_VERSION 28
|
||||
#define DATABASE_SCHEMA_VERSION 29
|
||||
|
||||
class Servatrice;
|
||||
|
||||
|
|
Loading…
Reference in a new issue