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, so I have a project that has multiple components separating into different packages that logically separate certain parts of the db schema. I have been setting up sqlc.yaml to have multiple schema.sql and query.sql for each of these components. However, we also have migration SQL files that encompass all schemas and updates across all these different components. This seems like a duplication of schema data, so I have been looking into trying just to have sqlc examine the migration files and not store schema.sql files in each component.
My question is, is it a common pattern to have both schema.sql and migration files? Does one typically use just migration files? A related question is if schema.sql should be treated like migration files (i.e. include ALTER, etc) or if should it represent the schema in the current version of the code.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, so I have a project that has multiple components separating into different packages that logically separate certain parts of the db schema. I have been setting up sqlc.yaml to have multiple schema.sql and query.sql for each of these components. However, we also have migration SQL files that encompass all schemas and updates across all these different components. This seems like a duplication of schema data, so I have been looking into trying just to have sqlc examine the migration files and not store schema.sql files in each component.
My question is, is it a common pattern to have both schema.sql and migration files? Does one typically use just migration files? A related question is if schema.sql should be treated like migration files (i.e. include ALTER, etc) or if should it represent the schema in the current version of the code.
Beta Was this translation helpful? Give feedback.
All reactions