1-- Various changes to telecommands storage to bring into line with CHART-EPSSG
2
3ALTER TABLE tc_store RENAME COLUMN pus_service TO pus_service_type;
4ALTER TABLE tc_store RENAME COLUMN pus_subservice TO pus_service_subtype;
5ALTER TABLE tc_store RENAME COLUMN pus_id TO pus_apid;
6ALTER TABLE tc_store
7 ADD COLUMN ops_angle double precision,
8 ADD COLUMN ops_orbit bigint CHECK (ops_orbit >= 0),
9 ADD COLUMN is_mrc smallint CHECK (is_mrc >= 0),
10 ADD COLUMN is_reinserted smallint CHECK (is_reinserted >= 0),
11 ADD COLUMN ext_source_id bigint CHECK (ext_source_id >= 0);
12CREATE INDEX ON tc_store (sid_num, execut_time);