diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-01-09 17:28:46 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-01-09 17:28:46 +0200 |
| commit | 936d3cf690ace9adfdfe0fb44193c11a0cb26d95 (patch) | |
| tree | 3d0699aa5c50efb7ecac3dddd25fe959366b7562 /internal/server/api/migrations/20250109144057_indices.sql | |
| parent | d0cb135161b18f37c25501cb863fa783cd723758 (diff) | |
Added goose for migrations, refactored SQL schema, server and client
are broken
Diffstat (limited to 'internal/server/api/migrations/20250109144057_indices.sql')
| -rw-r--r-- | internal/server/api/migrations/20250109144057_indices.sql | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/server/api/migrations/20250109144057_indices.sql b/internal/server/api/migrations/20250109144057_indices.sql new file mode 100644 index 0000000..1732fb2 --- /dev/null +++ b/internal/server/api/migrations/20250109144057_indices.sql @@ -0,0 +1,9 @@ +-- +goose Up +CREATE INDEX IF NOT EXISTS idx_frequency_network ON frequencies (network_id); +CREATE INDEX IF NOT EXISTS idx_frequency_messages ON messages (frequency_id); +CREATE INDEX IF NOT EXISTS idx_direct_messages ON messages (sender_id, receiver_id); + +-- +goose Down +DROP INDEX IF EXISTS idx_frequency_network; +DROP INDEX IF EXISTS idx_frequency_messages; +DROP INDEX IF EXISTS idx_direct_messages; |
