summaryrefslogtreecommitdiff
path: root/lib/output/pq/sql
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-07-25 12:46:14 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-07-25 12:46:14 +0100
commitd04bf78af08885e17ebaae7f198f93bbf06817e7 (patch)
tree7d37b6dd491270481b620cb24ba4dd01edde7dbf /lib/output/pq/sql
parentAdd before/after event to update position in replication stream (diff)
downloadmygrate-d04bf78af08885e17ebaae7f198f93bbf06817e7.tar.bz2
mygrate-d04bf78af08885e17ebaae7f198f93bbf06817e7.tar.xz
mygrate-d04bf78af08885e17ebaae7f198f93bbf06817e7.zip
Support the rotate event to move to the next binlog file
Diffstat (limited to 'lib/output/pq/sql')
-rw-r--r--lib/output/pq/sql/updateSourceRotate.sql4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/output/pq/sql/updateSourceRotate.sql b/lib/output/pq/sql/updateSourceRotate.sql
new file mode 100644
index 0000000..74e22fc
--- /dev/null
+++ b/lib/output/pq/sql/updateSourceRotate.sql
@@ -0,0 +1,4 @@
+UPDATE mygrate.source SET
+ filename = $1,
+ position = $2
+WHERE source_id = $3