-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add possibility to run arbitrary code in migration #61
Comments
@yzh44yzh Hello! First problem is in Multi-statement query, isn't it? I've tried to create N tables from config, and got this error:
(Multi-statements are not allowed) Error here My migration looks like:
For your case, I guess we can improve Pillar migrations, for example if migration has function What do you think? Could it help? |
Good idea. I believe multi-statement migrations could be used more widely that just for sharded tables. |
@yzh44yzh I found, that its already done
If in |
Great, thank you |
Hello. I think it would be good idea to allow ro run arbitrary code in migration. It would be useful for our case.
We have shard-tables like this:
The number of shards is defined by configuration. So we can't just run static SQL-query to migrate all those table.
In fact, we do migrations manually like this:
Do it manually is not good at all, so we are thinking to run it from Ecto migrations :) This idea is funny, but it will work. The other option is to improve Pillar migrations.
The text was updated successfully, but these errors were encountered: