(feat) Switched to sqlx.
Signed-off-by: Louis Hollingworth <louis@hollingworth.nl>
This commit is contained in:
parent
f267d6b285
commit
ba4216c21e
22 changed files with 957 additions and 579 deletions
17
migrations/20231026131105_create_users.up.sql
Normal file
17
migrations/20231026131105_create_users.up.sql
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Louis Hollingworth <louis@hollingworth.nl>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
-- Add up migration script here
|
||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
||||
|
||||
CREATE TABLE users (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
username VARCHAR UNIQUE NOT NULL,
|
||||
epost VARCHAR UNIQUE NOT NULL,
|
||||
pass VARCHAR NOT NULL,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
main_fedi TEXT
|
||||
);
|
||||
SELECT manage_updated_at('users');
|
||||
Loading…
Add table
Add a link
Reference in a new issue