From a14da5113f27d94a3896514cb87ed264c580b93b Mon Sep 17 00:00:00 2001 From: Matthieu Date: Tue, 7 Apr 2026 11:55:58 +0200 Subject: [PATCH] feat : add initial migration (User table) Co-Authored-By: Claude Opus 4.6 (1M context) --- migrations/Version20260407095546.php | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 migrations/Version20260407095546.php diff --git a/migrations/Version20260407095546.php b/migrations/Version20260407095546.php new file mode 100644 index 0000000..a8face8 --- /dev/null +++ b/migrations/Version20260407095546.php @@ -0,0 +1,32 @@ +addSql('CREATE TABLE "user" (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, username VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY (id))'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649F85E0677 ON "user" (username)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('DROP TABLE "user"'); + } +}