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

Make migrations RDBMS agnostic #739

Open
zabdurakhimov opened this issue Jan 20, 2020 · 1 comment
Open

Make migrations RDBMS agnostic #739

zabdurakhimov opened this issue Jan 20, 2020 · 1 comment

Comments

@zabdurakhimov
Copy link

This migration fails on PostgreSql database version 12 stating that

alter column slug in table {{%article}} to string(255) NOT NULL ...Exception: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error (near: "NOT") LINE 1: ...BLE "article" ALTER COLUMN "slug" TYPE varchar(255) NOT NULL

It runs with mysql database with no error though.
A possible solution might be placing a condition for checking and running the query in accordance with db type

@XzAeRo XzAeRo changed the title Migration error with postgresql Make migrations RDBMS agnostic Jan 22, 2020
@XzAeRo XzAeRo added this to the 3.2.0 milestone Jan 22, 2020
@XzAeRo
Copy link
Member

XzAeRo commented Jan 22, 2020

There are several things that are mysql specific. Definitely planning to fix this in the next update.

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

No branches or pull requests

2 participants