mirror of
https://github.com/actix/examples
synced 2025-06-28 18:00:37 +02:00
Restructure folders (#411)
This commit is contained in:
committed by
GitHub
parent
9db98162b2
commit
c3407627d0
3
database_interactions/pg/sql/add_user.sql
Normal file
3
database_interactions/pg/sql/add_user.sql
Normal file
@ -0,0 +1,3 @@
|
||||
INSERT INTO testing.users(email, first_name, last_name, username)
|
||||
VALUES ($1, $2, $3, $4)
|
||||
RETURNING $table_fields;
|
1
database_interactions/pg/sql/get_users.sql
Normal file
1
database_interactions/pg/sql/get_users.sql
Normal file
@ -0,0 +1 @@
|
||||
SELECT $table_fields FROM testing.users;
|
11
database_interactions/pg/sql/schema.sql
Normal file
11
database_interactions/pg/sql/schema.sql
Normal file
@ -0,0 +1,11 @@
|
||||
DROP SCHEMA IF EXISTS testing CASCADE;
|
||||
CREATE SCHEMA testing;
|
||||
|
||||
CREATE TABLE testing.users (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
email VARCHAR(200) NOT NULL,
|
||||
first_name VARCHAR(200) NOT NULL,
|
||||
last_name VARCHAR(200) NOT NULL,
|
||||
username VARCHAR(50) UNIQUE NOT NULL,
|
||||
UNIQUE (username)
|
||||
);
|
Reference in New Issue
Block a user