// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SEQUENCE details_commande_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE commandes_clients (commandes_id INT NOT NULL, clients_id INT NOT NULL, PRIMARY KEY(commandes_id, clients_id))');
$this->addSql('CREATE INDEX IDX_C665A6248BF5C2E6 ON commandes_clients (commandes_id)');
$this->addSql('CREATE INDEX IDX_C665A624AB014612 ON commandes_clients (clients_id)');
$this->addSql('CREATE TABLE details_commande (id INT NOT NULL, commande_id INT DEFAULT NULL, quantite INT NOT NULL, prix_unitaire DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_4BCD5F682EA2E54 ON details_commande (commande_id)');
$this->addSql('ALTER TABLE commandes_clients ADD CONSTRAINT FK_C665A6248BF5C2E6 FOREIGN KEY (commandes_id) REFERENCES commandes (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE commandes_clients ADD CONSTRAINT FK_C665A624AB014612 FOREIGN KEY (clients_id) REFERENCES clients (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');