Compare commits
1 Commits
main
...
lcc-credit
Author | SHA1 | Date | |
---|---|---|---|
|
ddb1fcd0ad |
@@ -17,6 +17,20 @@ EOF
|
||||
)
|
||||
query_postgres_container "$PRE_MIGRATE_SQL" ou13 || exit 1
|
||||
|
||||
# Digital currency specific - to comment if not needed
|
||||
INVOICE_NAME_SQL=$(cat <<'EOF'
|
||||
ALTER TABLE credit_request ADD invoice_name VARCHAR;
|
||||
UPDATE credit_request
|
||||
SET invoice_name = (
|
||||
SELECT move_name
|
||||
FROM account_invoice
|
||||
WHERE account_invoice.id = credit_request.invoice_id
|
||||
);
|
||||
UPDATE credit_request SET invoice_id = NULL;
|
||||
EOF
|
||||
)
|
||||
query_postgres_container "$INVOICE_NAME_SQL" ou13 || exit 1
|
||||
|
||||
# Copy filestores
|
||||
copy_filestore ou12 ou12 ou13 ou13 || exit 1
|
||||
|
||||
|
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "POST migration to 16.0..."
|
||||
|
||||
# Digital currency specific - to comment if not needed
|
||||
INVOICE_NAME_SQL=$(cat <<'EOF'
|
||||
UPDATE credit_request
|
||||
SET invoice_id = (
|
||||
SELECT id
|
||||
FROM account_move
|
||||
WHERE account_move.name = credit_request.invoice_name
|
||||
);
|
||||
EOF
|
||||
)
|
||||
query_postgres_container "$INVOICE_NAME_SQL" ou16 || exit 1
|
||||
|
||||
echo "END POST migration to 16.0."
|
||||
|
Reference in New Issue
Block a user