This PR breaks up the massive rcos.sql and converts it and the other SQL files into DbMate migrations. Migrations are ordered according to the timestamp at the start of their filename. Ignore some odd sequential timestamps, some things needed manual re-ordering.
Along with this I took the time to refactor much of the SQL and to cleanup a lot of the weirdness created from generating it from DBML. Along with various other things like some CHECKs, a new checked url type, and improved relations.
These migrations are fully functional and can be applied with dbmate up and rolled all the way back down to a clean database with dbmate down (you have to run that repeatedly since it only goes on at a time).
This PR breaks up the massive
rcos.sql
and converts it and the other SQL files into DbMate migrations. Migrations are ordered according to the timestamp at the start of their filename. Ignore some odd sequential timestamps, some things needed manual re-ordering.Along with this I took the time to refactor much of the SQL and to cleanup a lot of the weirdness created from generating it from DBML. Along with various other things like some
CHECK
s, a new checkedurl
type, and improved relations.These migrations are fully functional and can be applied with
dbmate up
and rolled all the way back down to a clean database withdbmate down
(you have to run that repeatedly since it only goes on at a time).