From 50ce8cb96b2b218751c2fc2a6b19372f51846acc Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Mon, 14 Jul 2025 19:34:59 +0300 Subject: feat: rewrite in rust --- migrations/20240101000100_create_locations.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 migrations/20240101000100_create_locations.sql (limited to 'migrations/20240101000100_create_locations.sql') 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 -- cgit v1.2.3