mirror of
https://github.com/outbackdingo/labca.git
synced 2026-01-27 02:19:27 +00:00
Fix new(ish) db migration and add check
This commit is contained in:
20
dev/versions
20
dev/versions
@@ -77,6 +77,20 @@ colorGoVersion2() {
|
||||
echo "* $fileName:$res"
|
||||
}
|
||||
|
||||
colorEqual() {
|
||||
local first="$1"
|
||||
local second="$2"
|
||||
|
||||
if [ "$first" = "$second" ]; then
|
||||
res=$(echo $first | sed -e "s/$first/${COL_LIGHT_GREEN}$first${COL_NC}/")
|
||||
echo " $res"
|
||||
else
|
||||
res=$(echo $first | sed -e "s/$first/${COL_LIGHT_RED}$first${COL_NC}/")
|
||||
echo " $res, but have $second"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
echo
|
||||
|
||||
cd ../boulder
|
||||
@@ -112,3 +126,9 @@ grep GO_VERSION ../boulder/docker-compose.yml | sed -e "s/\s*GO_VERSION:/ /"
|
||||
colorGoVersion2 build/docker-compose.yml $goversion
|
||||
echo
|
||||
|
||||
db_migrs=$(ls -1 ../boulder/sa/db/boulder_sa/ | wc -l)
|
||||
db_patches=$(ls -1 ../labca/patches/db_migrations* | wc -l)
|
||||
echo -n "Database migrations "
|
||||
colorEqual $db_migrs $db_patches
|
||||
echo
|
||||
|
||||
|
||||
1
patch.sh
1
patch.sh
@@ -33,6 +33,7 @@ $SUDO patch -p1 < $cloneDir/patches/db_migrations.patch
|
||||
$SUDO patch -p1 < $cloneDir/patches/db_migrations2.patch
|
||||
$SUDO patch -p1 < $cloneDir/patches/db_migrations3.patch
|
||||
$SUDO patch -p1 < $cloneDir/patches/db_migrations4.patch
|
||||
$SUDO patch -p1 < $cloneDir/patches/db_migrations5.patch
|
||||
$SUDO patch -p1 < $cloneDir/patches/errors_errors.patch
|
||||
$SUDO patch -p1 < $cloneDir/patches/expiration-mailer_main.patch
|
||||
$SUDO patch -p1 < $cloneDir/patches/issuance_crl.patch
|
||||
|
||||
13
patches/db_migrations5.patch
Normal file
13
patches/db_migrations5.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/sa/db/boulder_sa/20240514000000_Paused.sql b/sa/db/boulder_sa/20240514000000_Paused.sql
|
||||
index 9f5890cad..1707916ba 100644
|
||||
--- a/sa/db/boulder_sa/20240514000000_Paused.sql
|
||||
+++ b/sa/db/boulder_sa/20240514000000_Paused.sql
|
||||
@@ -5,7 +5,7 @@
|
||||
-- partition it. This table expected to be < 800K rows initially and grow at a
|
||||
-- rate of ~18% per year.
|
||||
|
||||
-CREATE TABLE `paused` (
|
||||
+CREATE TABLE IF NOT EXISTS `paused` (
|
||||
`registrationID` bigint(20) UNSIGNED NOT NULL,
|
||||
`identifierType` tinyint(4) NOT NULL,
|
||||
`identifierValue` varchar(255) NOT NULL,
|
||||
Reference in New Issue
Block a user