We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We have PostgreSQL table state like:
create table logs ( ..., target varchar(7) constraint logs_target_enum_62e2522d7df9c check ((target)::text = 'catalog'::text) );
but cycle:migrate can't detect that field already have enum type and each next migration tries to fix it in next way:
cycle:migrate
class OrmDefault561cd35f5d5487d642a5bd8b65997299 extends Migration { public function up(): void { $this->table('logs') ->alterColumn('target', 'enum', [ 'nullable' => true, 'default' => null, 'values' => [ 'catalog' ] ]) ->update(); } public function down(): void { $this->table('logs') ->alterColumn('target', 'string', [ 'nullable' => true, 'default' => null, 'size' => 7 ]) ->update(); } }
As I can see migrator can't understand that field already have enum functionality based on constraints
The text was updated successfully, but these errors were encountered:
One more comment - it is actual only for cases when enum contains only one value
Sorry, something went wrong.
msmakouz
Successfully merging a pull request may close this issue.
We have PostgreSQL table state like:
but
cycle:migrate
can't detect that field already have enum type and each next migration tries to fix it in next way:As I can see migrator can't understand that field already have enum functionality based on constraints
The text was updated successfully, but these errors were encountered: