addSql('CREATE TABLE representations (id INT AUTO_INCREMENT NOT NULL, uuid VARCHAR(36) NOT NULL, full_name VARCHAR(255) NOT NULL, mobile_number VARCHAR(20) DEFAULT NULL, city VARCHAR(255) DEFAULT NULL, commission_percent NUMERIC(5, 2) NOT NULL, bank_account JSON DEFAULT NULL, active TINYINT NOT NULL, created_at INT NOT NULL, updated_at INT NOT NULL, user_id INT NOT NULL, UNIQUE INDEX UNIQ_C90A401D17F50A6 (uuid), UNIQUE INDEX UNIQ_C90A401A76ED395 (user_id), PRIMARY KEY (id)) DEFAULT CHARACTER SET utf8mb4'); $this->addSql('ALTER TABLE representations ADD CONSTRAINT FK_C90A401A76ED395 FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE representations DROP FOREIGN KEY FK_C90A401A76ED395'); $this->addSql('DROP TABLE representations'); } }