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

Use fizz migrations to generate SQL migrations #448

Closed
aeneasr opened this issue Feb 16, 2021 · 6 comments · Fixed by #638
Closed

Use fizz migrations to generate SQL migrations #448

aeneasr opened this issue Feb 16, 2021 · 6 comments · Fixed by #638
Assignees
Labels
blocking Blocks milestones or other issues or pulls.

Comments

@aeneasr
Copy link
Member

aeneasr commented Feb 16, 2021

Describe the bug

The SQL migrations are currently handwritten and ignore the fizz templating pipeline we've built. The pipeline should be used instead.

@aeneasr aeneasr added the blocking Blocks milestones or other issues or pulls. label Feb 16, 2021
@aeneasr
Copy link
Member Author

aeneasr commented Feb 16, 2021

@zepatrik ping me when you work on this so we can take a look at the templating for the column names.

@aeneasr
Copy link
Member Author

aeneasr commented Mar 29, 2021

You resolved this, right?

@zepatrik
Copy link
Member

Nope, this is still up. We will anyways have to do some manual post-processing, is it really worth adding fizz? E.g. Cockroach indexes can use the prefix, so we might remove some indexes there:

Queries can benefit from an index even if they only filter a prefix of its columns. For example, if you create an index of columns (A, B, C), queries filtering (A) or (A, B) can still use the index. However, queries that do not filter (A) will not benefit from the index.

This feature also lets you avoid using single-column indexes. Instead, use the column as the first column in a multiple-column index, which is useful to more queries.

https://www.cockroachlabs.com/docs/v20.1/indexes.html

@zepatrik
Copy link
Member

And we have to replace the table name with the template stuff

@aeneasr
Copy link
Member Author

aeneasr commented Mar 29, 2021

Ok, it should still work with other things for fizz templating. Maybe we allow our small CLI script to support raw SQL templates too and then it just copies them over without changing anything?

@aeneasr
Copy link
Member Author

aeneasr commented Apr 1, 2021

Moving this to next milestone, but it needs to be addressed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking Blocks milestones or other issues or pulls.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants