Verified Commit a5957f5e authored by Artemis's avatar Artemis 🐱

Added a migration to fix the data model

parent 2c5da387
<?php
use Phinx\Migration\AbstractMigration;
class FixGenerated extends AbstractMigration
{
public function up()
{
$this->execute('ALTER TABLE articles ALTER COLUMN id SET GENERATED BY DEFAULT;');
$this->execute('ALTER TABLE categories ALTER COLUMN id SET GENERATED BY DEFAULT;');
}
public function down()
{
$this->execute('ALTER TABLE articles ALTER COLUMN id SET GENERATED ALWAYS;');
$this->execute('ALTER TABLE categories ALTER COLUMN id SET GENERATED ALWAYS;');
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment