mirror of https://github.com/sipwise/db-schema.git
parent
64ee22ac8c
commit
82ce223f15
@ -0,0 +1,7 @@
|
||||
USE accounting;
|
||||
|
||||
SET AUTOCOMMIT=0;
|
||||
|
||||
UPDATE cdr SET export_status='unexported', exported_at=NULL;
|
||||
|
||||
COMMIT;
|
||||
@ -0,0 +1,8 @@
|
||||
USE accounting;
|
||||
|
||||
SET AUTOCOMMIT=0;
|
||||
|
||||
SELECT acc_id FROM mark WHERE collector='exporter-lastid' INTO @lastid;
|
||||
UPDATE cdr SET export_status='ok', exported_at=NOW() WHERE id <= @lastid;
|
||||
|
||||
COMMIT;
|
||||
Loading…
Reference in new issue