File: rem_history.sql.in

package info (click to toggle)
tango 10.0.2%2Bdfsg1-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 89,480 kB
  • sloc: cpp: 201,245; sh: 1,645; python: 953; java: 800; perl: 467; javascript: 447; xml: 325; makefile: 269; sql: 72; ruby: 24
file content (27 lines) | stat: -rw-r--r-- 643 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# vim: filetype=mysql:

USE @TANGO_DB_NAME@;

#
# Update all history ids to 0
#

UPDATE class_attribute_history_id SET id=0;
UPDATE class_history_id SET id=0;
UPDATE class_pipe_history_id SET id=0;
UPDATE device_attribute_history_id SET id=0;
UPDATE device_history_id SET id=0;
UPDATE device_pipe_history_id SET id=0;
UPDATE object_history_id SET id=0;

#
# Clean up history tables
#

DELETE FROM property_attribute_class_hist;
DELETE FROM property_attribute_device_hist;
DELETE FROM property_class_hist;
DELETE FROM property_device_hist;
DELETE FROM property_hist;
DELETE FROM property_pipe_class_hist;
DELETE FROM property_pipe_device_hist;