diff --git a/data/data.db b/data/data.db index 28e5106..3684279 100644 Binary files a/data/data.db and b/data/data.db differ diff --git a/migrations/Version20240622233923.php b/migrations/Version20240622233923.php new file mode 100644 index 0000000..621e0e9 --- /dev/null +++ b/migrations/Version20240622233923.php @@ -0,0 +1,38 @@ +addSql('ALTER TABLE user ADD COLUMN meta_data CLOB DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE TEMPORARY TABLE __temp__user AS SELECT id, email, roles, password, name FROM user'); + $this->addSql('DROP TABLE user'); + $this->addSql('CREATE TABLE user (id BLOB NOT NULL --(DC2Type:uuid) + , email VARCHAR(180) NOT NULL, roles CLOB NOT NULL --(DC2Type:json) + , password VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); + $this->addSql('INSERT INTO user (id, email, roles, password, name) SELECT id, email, roles, password, name FROM __temp__user'); + $this->addSql('DROP TABLE __temp__user'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL ON user (email)'); + } +}