diff options
| author | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-14 19:34:59 +0300 |
|---|---|---|
| committer | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-14 19:34:59 +0300 |
| commit | 50ce8cb96b2b218751c2fc2a6b19372f51846acc (patch) | |
| tree | e2c634d2ce856062d527667d47815a05a53361c8 /migrations/20240101000100_create_locations.sql | |
| parent | 0ab2e5ba2b0631b28b5b1405559237b3913c878f (diff) | |
feat: rewrite in rust
Diffstat (limited to 'migrations/20240101000100_create_locations.sql')
| -rw-r--r-- | migrations/20240101000100_create_locations.sql | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/migrations/20240101000100_create_locations.sql b/migrations/20240101000100_create_locations.sql new file mode 100644 index 0000000..501fb10 --- /dev/null +++ b/migrations/20240101000100_create_locations.sql @@ -0,0 +1,9 @@ +-- Migration: Create locations table +CREATE TABLE IF NOT EXISTS locations ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + latitude REAL NOT NULL, + longitude REAL NOT NULL, + user_id INTEGER NOT NULL, + FOREIGN KEY(user_id) REFERENCES users(id) ON DELETE NO ACTION +); +CREATE INDEX IF NOT EXISTS idx_locations_user_id ON locations(user_id);
\ No newline at end of file |
