mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-28 13:58:31 +02:00
Added support for SQLite.
This commit is contained in:
parent
bd1da1ce5e
commit
74e4c4d0d1
12 changed files with 340 additions and 40 deletions
|
@ -22,20 +22,21 @@ declare(strict_types=1);
|
|||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use App\Migrations\AbstractMultiPlatformMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20190924113252 extends AbstractMigration
|
||||
final class Version20190924113252 extends AbstractMultiPlatformMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
public function mySQLUp(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
|
||||
|
@ -121,7 +122,7 @@ final class Version20190924113252 extends AbstractMigration
|
|||
$this->addSql('CREATE INDEX IDX_6940A7FE6DEDCEC2 ON parts (id_preview_attachement)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function mySQLDown(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
|
||||
|
@ -169,4 +170,14 @@ final class Version20190924113252 extends AbstractMigration
|
|||
$this->addSql('DROP INDEX IDX_1483A5E96DEDCEC2 ON `users`');
|
||||
$this->addSql('ALTER TABLE `users` ADD config_image_path TEXT NOT NULL COLLATE utf8_general_ci, DROP id_preview_attachement, DROP pw_reset_token, DROP pw_reset_expires, DROP disabled');
|
||||
}
|
||||
|
||||
public function sqLiteUp(Schema $schema): void
|
||||
{
|
||||
$this->skipIf(true, "Migration not needed for SQLite. Skipping...");
|
||||
}
|
||||
|
||||
public function sqLiteDown(Schema $schema): void
|
||||
{
|
||||
$this->skipIf(true, "Migration not needed for SQLite. Skipping...");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue