Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yii2 migration error - This syntax for *MergeTree engine is deprecated #32

Open
indover opened this issue Aug 17, 2023 · 1 comment
Open

Comments

@indover
Copy link

indover commented Aug 17, 2023

...

@Ser6-IO
Copy link

Ser6-IO commented Aug 28, 2024

I solved it by extending the migration controller and overriding the createMigrationHistoryTable action:
public function createMigrationHistoryTable() { $tableName = $this->db->schema->getRawTableName($this->migrationTable); $this->stdout("Creating migration history table \"$tableName\"...", Console::FG_YELLOW); $this->db->createCommand()->createTable($this->migrationTable, [ 'version' => 'String', 'date' => 'Date', 'apply_time' => 'UInt32', 'is_deleted' => 'UInt8' //0 active 1 //deleted ], '**ENGINE MergeTree() ORDER BY (date)**')->execute(); $this->addMigrationHistory(self::BASE_MIGRATION); $this->stdout("Done.\n", Console::FG_GREEN); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants