-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Migration script 11.0.0-12.0.0.sql fails when upgrading #14142
Comments
Thanks for the quick fix. I tried it but there seems to be one error left: DB_ERROR_42804: ALTER TABLE llx_extrafields MODIFY COLUMN printable integer DEFAULT 0; Somehow postgresql does not like that when modifying a column. |
I also had problems during the migration with PostgreSQL for casting from
It should work if you have no data in this table. Otherwise something like this should be considered. |
In my case there are data inside this table. Is it possible to use
database agnostic migration files? Up until now I never had any problems
with upgrading a major version of dolibarr. I will have a look into the
provided link. Thanks for the help so far.
…On 03.07.20 14:13, Sébastien Feugère wrote:
I also had problems during the migration with PostgreSQL for cqasting
to |BOOLEAN| to |INTEGER|. I updated the script with:
|ALTER TABLE llx_extrafields ADD COLUMN printable_int integer DEFAULT
0; ALTER TABLE llx_extrafields DROP COLUMN printable; ALTER TABLE
llx_extrafields RENAME COLUMN printable_int TO printable; |
It should work if you have no data in this table. Otherwise something
like this <https://www.ezvan.fr/psql-conversion.html> should be
considered.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#14142 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACPT767P6DVWWTSU3GI46KTRZXDQNANCNFSM4OKSN3FA>.
|
This was fixed in 48adeb9. Please close |
I'm using postgresql 9.6.17. The following error came up:
DB_ERROR_SYNTAX: DROP INDEX ix_fk_product_stockALTER TABLE llx_actioncomm DROP COLUMN punctual;
ERROR: 42601: syntax error at or near "TABLE" LINE 1: DROP INDEX ix_fk_product_stockALTER TABLE llx_actioncomm DRO... ^ LOCATION: scanner_yyerror, scan.l:1127
DB_ERROR_42804: ALTER TABLE llx_extrafields MODIFY COLUMN printable integer DEFAULT 0;
ERROR: 42804: column "printable" cannot be cast automatically to type integer HINT: You might need to specify "USING printable::integer". LOCATION: ATPrepAlterColumnType, tablecmds.c:8056
The text was updated successfully, but these errors were encountered: