createTable('automatic_email', [ 'id' => 'pk', 'id_producer' => Schema::TYPE_INTEGER.' NOT NULL', 'day' => Schema::TYPE_INTEGER.' NOT NULL', 'delay_before_distribution' => Schema::TYPE_INTEGER.' NOT NULL', 'subject' => Schema::TYPE_STRING.' NOT NULL', 'message' => Schema::TYPE_TEXT.' NOT NULL', 'integrate_product_list' => Schema::TYPE_BOOLEAN, 'status' => Schema::TYPE_INTEGER.' NOT NULL', ]); $this->addForeignKey('fk_automatic_email_id_producer', 'automatic_email', 'id_producer', 'producer', 'id'); } /** * {@inheritdoc} */ public function safeDown() { $this->dropTable('automatic_email'); } }