You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.2 KiB
35 lines
1.2 KiB
<?php |
|
|
|
declare(strict_types=1); |
|
|
|
namespace DoctrineMigrations; |
|
|
|
use Doctrine\DBAL\Schema\Schema; |
|
use Doctrine\Migrations\AbstractMigration; |
|
|
|
/** |
|
* Auto-generated Migration: Please modify to your needs! |
|
*/ |
|
final class Version20200404184835 extends AbstractMigration |
|
{ |
|
public function getDescription() : string |
|
{ |
|
return ''; |
|
} |
|
|
|
public function up(Schema $schema) : void |
|
{ |
|
// this up() migration is auto-generated, please modify it to your needs |
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'sqlite', 'Migration can only be executed safely on \'sqlite\'.'); |
|
|
|
$this->addSql('CREATE TABLE facture (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, client_adresse_ip VARCHAR(255) NOT NULL, montant_ht DOUBLE PRECISION NOT NULL, montant_tva DOUBLE PRECISION NOT NULL, facture_create_at DATE NOT NULL)'); |
|
} |
|
|
|
public function down(Schema $schema) : void |
|
{ |
|
// this down() migration is auto-generated, please modify it to your needs |
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'sqlite', 'Migration can only be executed safely on \'sqlite\'.'); |
|
|
|
$this->addSql('DROP TABLE facture'); |
|
} |
|
}
|
|
|