-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Change MySQL DDL to not use helper stored procedures by default - was auto-generated script containing create procedures fails #1802
Comments
Was this not fixed by ebean-orm/ebean-migration#69 ? |
@almothafar Can you add a comment please? |
What is your DBMS @cyrilfr? Workarounds mentioned already in playframework/play-ebean#166 If you are using SQL Server, with the versions of 11.41.4 or later for ebean-orm and 11.19.1 or later for ebean-migration (and BTW play-ebean does not use these versions, it is sitting on older versions), you should have GO and no delimiters! and still, you need to do manual workarounds or run the script manually. |
@rbygrave I've this issue with the last version of the plugin and the last version of ebean.
|
As far as I know, MySQL supports |
Yes, the second one occurs when I try the workaround (as you can see there is |
What about the raw script generated by ebean without any workarounds? the workaround should be applied if you want to use play-ebean to apply script, but if you want to do that manually using console or SQL tool, you need to use the raw script without modification, and then later for evolution, you tell Play the matter is resolved. |
It says
as you can see on my screenshot, phpMyAdmin underlines syntax errors. |
According to this stackoverflow answer:
That means that this version of Ebean isn't compatible with MySQL/MariaDB anymore. |
No it doesn't. What it means is that Ebean's DDL runner can parse The problem I think is that the Play framework DDL parser/runner does not parse the DELIMITER keyword. So that gives you are few options:
The only option that Ebean can help is with the 3rd option. Have a configuration option to not use the db helper functions as part of DB migrations. |
OK I see. I'll try to disable the db helper functions. I don't even know if Play Framework has a DDL parser/runner. I just see Evolutions generating SQL files and running them if needed. Maybe I'm wrong about it... I discovered the DDL scripts with this issue... |
My thought is that we can have the option of not using the db stored procedure functions for MySql. They are used for MySql to support "drop column" in a more robust manor. We can have the option to just use a normal "drop column" knowing that it won't work in the cases that the column is referenced as a foreign key etc (but that is ok, people can manually tweak the migration for those cases). So I'm looking to do that. I should update this in a few days. Cheers, Rob. |
…lt - was auto-generated script containing create procedures fails
I experience this issue with the Ebean SBT plugin while running the auto-generated script.
The script is actually produced by the plugin calling this method:
from the EbeanDynamicEvolutions.java file.
There is a syntax error when I try to run the SQL script manually:
The text was updated successfully, but these errors were encountered: