mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Change row format of tables before creating indices
This is nee
This commit is contained in:
parent
40f0d00e37
commit
79877c787e
2 changed files with 25 additions and 1 deletions
|
@ -56,7 +56,7 @@ Part-DB is also used by small companies and universities for managing their inve
|
|||
## Requirements
|
||||
* A **web server** (like Apache2 or nginx) that is capable of running [Symfony 5](https://symfony.com/doc/current/reference/requirements.html),
|
||||
this includes a minimum PHP version of **PHP 7.4**
|
||||
* A **MySQL** (at least 5.6.5) /**MariaDB** (at least 10.0.1) database server if you do not want to use SQLite.
|
||||
* A **MySQL** (at least 5.7) /**MariaDB** (at least 10.2.2) database server if you do not want to use SQLite.
|
||||
* Shell access to your server is highly suggested!
|
||||
* For building the client side assets **yarn** and **nodejs** is needed.
|
||||
|
||||
|
|
|
@ -20,6 +20,30 @@ final class Version20220925162725 extends AbstractMultiPlatformMigration
|
|||
|
||||
public function mySQLUp(Schema $schema): void
|
||||
{
|
||||
//Change row format to dynamic to allow longer indices (this step is only needed for databases created with an older MySQL/MariaDB version
|
||||
$this->addSql('ALTER TABLE attachments ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE attachment_types ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE categories ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE devices ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE device_parts ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE footprints ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE groups ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE internal ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE label_profiles ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE log ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE manufacturers ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE measurement_units ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE migration_versions ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE orderdetails ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE parameters ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE parts ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE part_lots ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE pricedetails ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE storelocations ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE suppliers ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE u2f_keys ROW_FORMAT=DYNAMIC');
|
||||
$this->addSql('ALTER TABLE users ROW_FORMAT=DYNAMIC');
|
||||
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE INDEX attachment_types_idx_name ON attachment_types (name)');
|
||||
$this->addSql('CREATE INDEX attachment_types_idx_parent_name ON attachment_types (parent_id, name)');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue