Closed alovak closed 4 years ago
re: deployment in prod - I'm going to take a backup and move the tables to backfill with the new schemas. Will take a few minutes to do, so I'm not worried.
For OSS folks we will announce that v0.5 is a breaking change with this and they'll need to follow steps similar to what I end up doing.
@adamdecaf
re: deployment in prod - I'm going to take a backup and move the tables to backfill with the new schemas. Will take a few minutes to do, so I'm not worried.
then we have to manually create migration table (schema_migrations) and insert number of the latest migration there... or our application during the next run will run all migrations again.
is it ok?
We don't need to manually create any tables. The migrator library creates them for us.
Oh. Rigth. So I'll add it to /migrations
Merging #253 into master will increase coverage by
0.12%
. The diff coverage is51.20%
.
@@ Coverage Diff @@
## master #253 +/- ##
==========================================
+ Coverage 61.43% 61.56% +0.12%
==========================================
Files 52 50 -2
Lines 3021 2901 -120
==========================================
- Hits 1856 1786 -70
+ Misses 832 803 -29
+ Partials 333 312 -21
I see CI failing and I think we should run the same steps CI is doing locally to figure out what's going wrong.
Great work Pavel!
As part of #120 with this PR we are replacing internal/database with base/database package. Major change is that now we have
/migations
where all migrations are stored.Some issues/concerns:
Tasks:
[x] replace internal/database with base/database
[x] create separate migration files in /migrations
[x] update makefile to generate file with embedded migrations (they are embedded into go file using pkger)
[x] fix all loggers to follow new base/log interface
[x] squash migrations
[x] create instructions on how to update to v0.5 (dump; drop; create;load)
[x] update docs with instructions on how to embed migrations (install pkger; make embed-migrations)