updateeeeee
This commit is contained in:
parent
0c758749e0
commit
ca9819a436
12 changed files with 214 additions and 156 deletions
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20250609175837 extends AbstractMigration
|
||||
final class Version20250610173233 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
|
@ -23,20 +23,11 @@ final class Version20250609175837 extends AbstractMigration
|
|||
$this->addSql(<<<'SQL'
|
||||
CREATE TABLE drink_type (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, created_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
, updated_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
, name VARCHAR(255) NOT NULL, description CLOB DEFAULT NULL, desired_stock INTEGER NOT NULL)
|
||||
, name VARCHAR(255) NOT NULL, description CLOB DEFAULT NULL, wanted_stock INTEGER NOT NULL, current_stock INTEGER NOT NULL)
|
||||
SQL);
|
||||
$this->addSql(<<<'SQL'
|
||||
CREATE UNIQUE INDEX UNIQ_841484B15E237E06 ON drink_type (name)
|
||||
SQL);
|
||||
$this->addSql(<<<'SQL'
|
||||
CREATE TABLE inventory_record (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, drink_type_id INTEGER NOT NULL, quantity INTEGER NOT NULL, timestamp DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
, created_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
, updated_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
, CONSTRAINT FK_9BE8033AE7E8D8A1 FOREIGN KEY (drink_type_id) REFERENCES drink_type (id) NOT DEFERRABLE INITIALLY IMMEDIATE)
|
||||
SQL);
|
||||
$this->addSql(<<<'SQL'
|
||||
CREATE INDEX IDX_9BE8033AE7E8D8A1 ON inventory_record (drink_type_id)
|
||||
SQL);
|
||||
$this->addSql(<<<'SQL'
|
||||
CREATE TABLE "order" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, created_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
, updated_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
|
@ -73,9 +64,6 @@ final class Version20250609175837 extends AbstractMigration
|
|||
$this->addSql(<<<'SQL'
|
||||
DROP TABLE drink_type
|
||||
SQL);
|
||||
$this->addSql(<<<'SQL'
|
||||
DROP TABLE inventory_record
|
||||
SQL);
|
||||
$this->addSql(<<<'SQL'
|
||||
DROP TABLE "order"
|
||||
SQL);
|
Loading…
Add table
Add a link
Reference in a new issue