cln: remove Elabore migration specific sql scripts
This commit is contained in:
@@ -6,20 +6,7 @@ echo "Prepare migration to 16.0..."
|
|||||||
copy_database ou15 ou16 ou16 || exit 1
|
copy_database ou15 ou16 ou16 || exit 1
|
||||||
|
|
||||||
# Execute SQL pre-migration commands
|
# Execute SQL pre-migration commands
|
||||||
PRE_MIGRATE_SQL=$(cat <<'EOF'
|
PRE_MIGRATE_SQL=""
|
||||||
/* Remove duplicate entries in model utm.source */
|
|
||||||
DELETE FROM utm_source
|
|
||||||
WHERE id IN (
|
|
||||||
SELECT id
|
|
||||||
FROM (
|
|
||||||
SELECT id,
|
|
||||||
ROW_NUMBER() OVER (PARTITION BY name ORDER BY id) as row_num
|
|
||||||
FROM utm_source
|
|
||||||
) t
|
|
||||||
WHERE t.row_num > 1
|
|
||||||
);
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
echo "SQL command = $PRE_MIGRATE_SQL"
|
echo "SQL command = $PRE_MIGRATE_SQL"
|
||||||
query_postgres_container "$PRE_MIGRATE_SQL" ou16 || exit 1
|
query_postgres_container "$PRE_MIGRATE_SQL" ou16 || exit 1
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user