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

Ecto.Adapters.ClickHouse.structure_load: not implemented #37

Closed
Zarathustra2 opened this issue Apr 17, 2023 · 5 comments · Fixed by #60
Closed

Ecto.Adapters.ClickHouse.structure_load: not implemented #37

Zarathustra2 opened this issue Apr 17, 2023 · 5 comments · Fixed by #60

Comments

@Zarathustra2
Copy link
Contributor

Can we support this? I am currently migrating my old clickhouse schema files over and would like to have my old schema in a structure.sql.

Can we not just split on ; and execute every query step by step with the caveat there is no option for a rollback and that it can fail while executing? I feel like this is reasonable for a load operation since one expects the structure.sql to only be loaded once or during ci jobs on clean fresh databases

@Zarathustra2
Copy link
Contributor Author

I will look into this then soonish!

@Zarathustra2
Copy link
Contributor Author

@ruslandoga I wanted to work on this. How do you set up your dev environement to run command line things such as mix ecto.load?

Do you create a separate app and then just reference your local ecto_ch as dependency?

@ruslandoga
Copy link
Contributor

ruslandoga commented Apr 27, 2023

I don't remember exactly what I did during development, I think I tested the callbacks directly: https://github.com/plausible/ecto_ch/blob/master/test/ecto/adapters/clickhouse/structure_test.exs, and once the tests were passing I did a manual test in plausible/analytics.

@Zarathustra2
Copy link
Contributor Author

Ah perfect, I am doing the same right now

@ruslandoga
Copy link
Contributor

ruslandoga commented Apr 27, 2023

History shows that I already had "working" code before adding the tests.

https://github.com/plausible/ecto_ch/pull/17/files

Maybe I used the dev repo: https://github.com/plausible/ecto_ch/blob/master/dev/repo.ex

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

Successfully merging a pull request may close this issue.

2 participants