Louis Hollingworth
f267d6b285
Having issues with fetching users; switch to sqlx? Signed-off-by: Louis Hollingworth <louis@hollingworth.nl>
19 lines
541 B
SQL
19 lines
541 B
SQL
-- SPDX-FileCopyrightText: 2023 Louis Hollingworth <louis@hollingworth.nl>
|
|
--
|
|
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
-- Your SQL goes here
|
|
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
|
|
|
CREATE TABLE users (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
username VARCHAR NOT NULL,
|
|
epost VARCHAR NOT NULL,
|
|
pass VARCHAR NOT NULL,
|
|
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
|
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
|
main_fedi TEXT,
|
|
UNIQUE(username, epost)
|
|
);
|
|
SELECT diesel_manage_updated_at('users');
|