You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I would like to start using refinery in a project that already has some logic to create tables on a first time start up (based on whether a sqlite file already exists or not). I'm unsure how I can introduce refinery in that context, specifically how to replace that logic with a v0 migration that works for both cases of first time setup and subsequent usages.
One way I can think of is to solve it on a SQL level by using "if not exists" when creating the tables, but maybe it can be solved in a better way by refinery?
The text was updated successfully, but these errors were encountered:
Hi there, thanks for the interest! Yes I am currently working on that, introduce the concept of Fake migrations so that you can:
generate a dump of the current schema of your database
fake migrate to that schema only creating and updating refinery schema migrations table
then it's just a matter of introducing new migrations on top of that one, would that work for you?
thanks
yes, that sounds good, i think it would be a useful addition.
for now i have solved this with a V0 migration that uses IF NOT EXISTS to create the tables and indices.
Hi, I would like to start using refinery in a project that already has some logic to create tables on a first time start up (based on whether a sqlite file already exists or not). I'm unsure how I can introduce refinery in that context, specifically how to replace that logic with a v0 migration that works for both cases of first time setup and subsequent usages.
One way I can think of is to solve it on a SQL level by using "if not exists" when creating the tables, but maybe it can be solved in a better way by refinery?
The text was updated successfully, but these errors were encountered: