[INSTRM-1293] pull out status column from sps_sequence table Created: 18/Jun/21 Updated: 15/Jul/21 Resolved: 15/Jul/21 |
|
| Status: | Done |
| Project: | Instrument control development |
| Component/s: | spt_operational_database |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Normal |
| Reporter: | arnaud.lefur | Assignee: | Kiyoto Yabe |
| Resolution: | Done | Votes: | 0 |
| Labels: | SPS | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Sprint: | SM1PD-2021 A 12 | ||||||||
| Description |
|
If we want to insert sps_sequence at the beginning, we need to pull out status column which is obviously known only at the end. We would need a new table :
You need to create the table in the first place then I will dump data from the existing column to the new table, then we can drop the status column from sps_sequence. |
| Comments |
| Comment by Kiyoto Yabe [ 18/Jun/21 ] |
|
OK, making a new table is very easy, but migrating existing data is a little bit tricky, so we need a coordination. We are going to update the opDB schema very soon for the PFI integration anyway, so we can target then for this update. Is this needed for only `obslog` business? |
| Comment by arnaud.lefur [ 18/Jun/21 ] |
|
Right. Yes, that's the main reason. |
| Comment by arnaud.lefur [ 28/Jun/21 ] |
|
With |
| Comment by Kiyoto Yabe [ 29/Jun/21 ] |
|
In terms of alembic operation, the following procedure is easier for me:
BTW, `output` (in `iic_sequence_status`) seems a reserved keyword by SQL (not by postgres, but one cannot rule out the possibility that it becomes reserved by postgres in future). Any other good candidate names? If not, we can proceed with it, I think. |
| Comment by arnaud.lefur [ 29/Jun/21 ] |
|
sounds good. okay, let's switch to cmd_output then. |