finalize migration 2026-04-04--01
This commit is contained in:
@@ -2,7 +2,7 @@ CREATE TABLE users (
|
|||||||
id BLOB NOT NULL UNIQUE PRIMARY KEY, -- UUIDv7 as bytes
|
id BLOB NOT NULL UNIQUE PRIMARY KEY, -- UUIDv7 as bytes
|
||||||
handle TEXT NOT NULL UNIQUE COLLATE NOCASE,
|
handle TEXT NOT NULL UNIQUE COLLATE NOCASE,
|
||||||
password TEXT, -- hashed, nullable in case of OAuth2-only login
|
password TEXT, -- hashed, nullable in case of OAuth2-only login
|
||||||
prof_pic TEXT -- link probably
|
prof_pic TEXT -- serialized ProfilePic
|
||||||
);
|
);
|
||||||
CREATE TABLE sessions (
|
CREATE TABLE sessions (
|
||||||
id BLOB NOT NULL UNIQUE PRIMARY KEY, -- UUIDv7 as bytes
|
id BLOB NOT NULL UNIQUE PRIMARY KEY, -- UUIDv7 as bytes
|
||||||
@@ -8,7 +8,7 @@ macro_rules! migration {
|
|||||||
($name, include_str!(concat!("./migrations/", $name, ".sql")))
|
($name, include_str!(concat!("./migrations/", $name, ".sql")))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const MIGRATIONS: &[(&str, &str)] = &[migration!("2026-03-07--01")];
|
const MIGRATIONS: &[(&str, &str)] = &[migration!("2026-04-04--01")];
|
||||||
|
|
||||||
pub static DB_URL: LazyLock<String> =
|
pub static DB_URL: LazyLock<String> =
|
||||||
LazyLock::new(|| env::var("DATABASE_URL").expect("DATABASE_URL is not set"));
|
LazyLock::new(|| env::var("DATABASE_URL").expect("DATABASE_URL is not set"));
|
||||||
|
|||||||
Reference in New Issue
Block a user