D. Berge
69f565f357
Update database templates to v0.3.10.
...
* Add interpolate_geometry_from_tstamp()
2022-05-12 21:52:31 +02:00
D. Berge
23de4d00d7
Add database upgrade file 23.
...
This defines a interpolate_geometry_from_tstamp(), taking a timestamp
and a maximum timespan in seconds. It will then interpolate a position
at the exact timestamp based on data from real_time_inputs, provided
that the effective interpolation timespan does not exceed the maximum
requested.
Fixes #243 .
2022-05-12 21:51:00 +02:00
D. Berge
1992efe914
Update database templates to v0.3.9.
...
* Add replace_placeholders()
* Add scan_placeholders() procedure
2022-05-12 21:47:38 +02:00
D. Berge
c7f3f565cd
Add database upgrade file 22.
...
This defines a replace_placeholders() function, taking as arguments
a text string and either a timestamp or a sequence / point pair. It
uses the latter arguments to find metadata from which it can extract
relevant information and replace it into the text string wherever the
appropriate placeholders appear. For instance, given a call such as
replace_placeholders('The position is @POS@', NULL, 11, 2600) it will
replace '@POS@' with the position of point 2600 in sequence 11, if it
exists (or leave the placeholder untouched otherwise).
A scan_placeholders() procedure is also defined, which calls the above
function on the entire event log.
Fixes #229 .
2022-05-12 21:45:56 +02:00
D. Berge
1da02738b0
Update database templates to v0.3.8.
...
* Add event_position()
* Add event_meta()
2022-05-12 21:40:23 +02:00
D. Berge
732d8e9be6
Add database upgrade file 21.
...
This adds event_position() and event_meta() functions which are used
to retrieve position or metadata, respectively, given either a timestamp
or a sequence / point pair. Intended to be used in the context of #229 .
2022-05-12 21:38:28 +02:00
D. Berge
a2bd614b17
Update database templates.
...
* Optimise public.geometry_from_tstamp()
* Remove index on public.real_time_inputs.meta->>'tstamp'
* Fix adjust_planner()
2022-05-10 21:57:53 +02:00
D. Berge
003c833293
Add database upgrade file 20.
...
This updates the adjust_planner() procedure to take into account the
new events schema (the `event` view has been replaced by `event_log`).
Fixes #208 .
2022-05-10 21:54:46 +02:00
D. Berge
a4c458dc16
Add database upgrade file 19.
...
Rewrites geometry_from_tstamp() to make it more efficient.
Fixes #241 .
2022-05-10 21:52:24 +02:00
D. Berge
7e8f00d9f2
Explicitly label comment sections in default template
2022-05-06 17:15:09 +02:00
D. Berge
f37e07796c
Change description of QC test.
...
It's not an error but only a warning.
2022-05-03 17:27:34 +02:00
D. Berge
1c291db6c6
Add database upgrade file 18.
...
* Adds label_in_sequence() function
NOTE: This function is already defined in schema-template.sql but
seemingly never got pushed into production.
Fixes #211 .
2022-05-02 13:40:33 +02:00
D. Berge
39690c991b
Update database templates.
...
* Add index on public.real_time_inputs.meta->>'tstamp'
* Add public.geometry_from_tstamp()
* Add augment_event_data()
2022-05-01 19:47:16 +02:00
D. Berge
09ead4878f
Add database upgrade file 17
2022-05-01 19:46:04 +02:00
D. Berge
588d210f24
Fix reporting for “gun pressures” QC test.
...
Fixes #205 .
2022-04-30 17:37:38 +02:00
D. Berge
1eac97cbd0
Change “No fire” QC definition
2022-04-30 16:13:12 +02:00
D. Berge
d386b97e42
Database upgrade 16: fix event edits.
...
Fixes #198 .
2022-04-27 17:41:53 +02:00
D. Berge
da578d2e50
Fix project_summary view returning unwanted rows.
...
Fixes #197 .
2022-04-27 10:49:46 +02:00
D. Berge
aa2b158088
Remove spurious actions from DB template
2022-03-16 21:30:32 +01:00
D. Berge
0d1f2b207c
Apply changes from 38e4e705a4 to DB schema template
2022-03-16 21:29:53 +01:00
D. Berge
38e4e705a4
Modify database upgrade file 12.
...
Two function that were dependent on the `events` view were
changed to work with `event_log` instead.
2022-03-16 21:08:42 +01:00
D. Berge
0727e7db69
Update database templates to schema v0.3.1
2022-03-15 14:17:28 +01:00
D. Berge
cd2e7bbd0f
Merge branch '184-refactor-qcs' into 138-keep-edit-history-of-event-log-entries
2022-03-09 21:26:40 +01:00
D. Berge
21d5383882
Update QC check definitions
2022-03-09 21:25:47 +01:00
D. Berge
648ce9970f
Interpolate timestamps for non-existing shotpoints
2022-03-09 21:22:33 +01:00
D. Berge
fd278a5ee6
Add database function: tstamp_interpolate
2022-03-09 21:21:48 +01:00
D. Berge
4f5cce33fc
Add comments to database functions
2022-03-09 21:21:01 +01:00
D. Berge
53bb75a2c1
Add new database upgrade file 11.
...
Some of the things in new upgrade file 12 depend
on the functions defined here.
2022-03-09 19:07:58 +01:00
D. Berge
45595bd64f
Rename database upgrades 11‒13 → 12‒14
2022-03-09 19:07:58 +01:00
D. Berge
ee9a33513a
Update database README
2022-02-28 21:27:20 +01:00
D. Berge
723c9cc166
Make it possible to repeatedly apply DB upgrade 11.
...
Even though this makes PostgreSQL 14 a hard dependency.
2022-02-28 21:26:19 +01:00
D. Berge
1e2c816ef3
Add database upgrade file 13.
...
Drops the old event tables.
NOTE: consider not applying this patch until confident that
the migration has proceeded smoothly. Dougal can operate just
fine without it.
2022-02-27 19:56:21 +01:00
D. Berge
54b457b4ea
Add database upgrade file 12.
...
Migrates data from old event tables to new.
2022-02-27 19:56:21 +01:00
D. Berge
c347b873c5
Update database README.
...
Add information on restoring from backup and troubleshooting
details when migrating PostgreSQL versions.
2022-02-27 19:56:21 +01:00
D. Berge
0c6567d8f8
Add database upgrade file 11
2022-02-27 19:56:12 +01:00
D. Berge
0ca44c3861
Add database upgrade file 10.
...
NOTE: this is the first time we modify the actual data
in the database, as opposed to adding to the schema.
2022-02-07 17:05:19 +01:00
D. Berge
36e7b1fe21
Add database upgrade file 09
2022-02-06 23:26:57 +01:00
D. Berge
e7fa74326d
Add README to database upgrades directory
2022-02-06 23:24:24 +01:00
D. Berge
b4569c14df
Update database README.
...
Document how to create a Dougal database from scratch
and how to update PostgreSQL.
2022-02-06 22:28:21 +01:00
D. Berge
acc829b978
Switch to production URL in ASAQC configuration
2021-10-06 04:16:17 +02:00
D. Berge
dfbccf3bc6
Add ASAQC (test) server details to configuration.
...
The URL corresponds to that of a built-in test server.
Note that the /etc/ssl directory is protected against
accidental inclusion into the repository by commit
458b6837. The TLS private key should *never* be
committed.
2021-10-04 02:21:00 +02:00
D. Berge
8da664a025
Add directory for TLS certificates.
...
And add it to .gitignore so its contents do not get committed
by accident.
2021-10-04 02:21:00 +02:00
D. Berge
374fb7de67
Add database upgrade file 08
2021-10-04 02:21:00 +02:00
D. Berge
a280a910f5
Add database upgrade file 07
2021-09-11 12:19:06 +02:00
D. Berge
040c1ead96
Show azimuth to two decimal places.
...
In planner report template.
Closes #126 .
2021-09-02 01:17:40 +02:00
D. Berge
b5f2945c8b
Fix end time in plan HTML template
2021-06-19 15:43:04 +02:00
D. Berge
09f60d6c18
Add database upgrade file 06
2021-06-19 12:23:25 +02:00
D. Berge
81d9ea19cc
Add adjust_planner() function to DB schema.
...
It updates the planned lines details according to production and current
time.
2021-06-19 12:18:28 +02:00
D. Berge
497d4d68f9
Call notify on changes to schema's info table
2021-06-19 12:17:26 +02:00
D. Berge
853deca3c3
Rename misnamed trigger
2021-06-19 12:16:37 +02:00