File: rem_history.sql.in

package info (click to toggle)
tango 10.1.0%2Bdfsg1-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 88,780 kB
  • sloc: cpp: 213,413; sh: 1,641; python: 1,264; javascript: 472; perl: 467; xml: 407; makefile: 294; java: 260; sql: 72
file content (27 lines) | stat: -rw-r--r-- 643 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
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;