File: rem_history.sql.in

package info (click to toggle)
tango 9.2.5a%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 21,624 kB
  • ctags: 11,597
  • sloc: cpp: 135,480; sh: 21,772; makefile: 1,103; ansic: 1,083; java: 215; python: 55
file content (26 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (3)
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
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;