diff options
| author | Kyren223 <Kyren223@proton.me> | 2024-11-23 20:27:10 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2024-11-23 20:27:10 +0200 |
| commit | b67ab26b89e16d4492145702b0ef899d3d6b7416 (patch) | |
| tree | 457e88f976e1812a01face1c0096b826ac6d8805 /migrations | |
| parent | 77d9971982e336aa6c0b816d84f2d37780c02de6 (diff) | |
Added frequency queries
Diffstat (limited to 'migrations')
| -rw-r--r-- | migrations/20241026174345_init.sql | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/migrations/20241026174345_init.sql b/migrations/20241026174345_init.sql index 49b840e..233ceba 100644 --- a/migrations/20241026174345_init.sql +++ b/migrations/20241026174345_init.sql @@ -91,6 +91,16 @@ BEGIN END -- +goose StatementEnd +-- +goose StatementBegin +CREATE TRIGGER on_frequency_delete +AFTER DELETE ON frequencies +BEGIN + UPDATE frequencies SET + position = position - 1 + WHERE network_id = OLD.network_id AND position > OLD.position; +END +-- +goose StatementEnd + -- +goose Down DROP TABLE messages; DROP TABLE users; |
