Added basic models and schemas.
Signed-off-by: Louis Hollingworth <louis@hollingworth.nl>
This commit is contained in:
parent
ab60127530
commit
b330bea46d
18 changed files with 250 additions and 1 deletions
6
migrations/2023-10-15-172140_create_users/down.sql
Normal file
6
migrations/2023-10-15-172140_create_users/down.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Louis Hollingworth <louis@hollingworth.nl>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
-- This file should undo anything in `up.sql`
|
||||
DROP TABLE users;
|
||||
16
migrations/2023-10-15-172140_create_users/up.sql
Normal file
16
migrations/2023-10-15-172140_create_users/up.sql
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
-- 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 SERIAL PRIMARY KEY,
|
||||
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()
|
||||
);
|
||||
SELECT diesel_manage_updated_at('users');
|
||||
Loading…
Add table
Add a link
Reference in a new issue