Skip to content

Commit d8d2331

Browse files
committed
sqlcmig6: add sqlcmig6 package
This commit introduces the `sqlcmig6` package, which at the time of this commit contains the same queries and models as `sqlc` package. Importantly though, once the kvdb to sql migration is made available in production, the `sqlcmig6` package will not change, as it is intended to represent the sql db as it was at the time of the migration. The sqlcmig6 package is therefore intended to be used in the kvdb to sql migration code, as it is will always be compatible with the sql database when all sql migrations prior to the kvdb to sql migration are applied. When additional sql migrations are added in the future, they may effect the `sqlc` package in such a way that the standard `sqlc` queries and models aren't compatible with kvdb to sql migration code any longer. By preserving the `sqlcmig6` package, we ensure that the kvdb to sql migration code can always use the same queries and models that were available at the time of the migration, even if the `sqlc` package changes in the future. Note that the `sqlcmig6` package have not been generated by `sqlc` (the queries and models are copied from the `sqlc` package), as it is not intended to be changed in the future.
1 parent 7792848 commit d8d2331

File tree

11 files changed

+2095
-0
lines changed

11 files changed

+2095
-0
lines changed

.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,9 @@ issues:
6161
- unused
6262
- deadcode
6363
- varcheck
64+
# As the db/sqlcmig6 package has been copied from sqlc generated code,
65+
# but isn't marked as code generated by sqlc, the code line length in the
66+
# package will often exceed the lll limit.
67+
- path: db/sqlcmig6/.*
68+
linters:
69+
- lll

0 commit comments

Comments
 (0)