Migrations
This commit is contained in:
15
migrations/V0002__create_users.sql
Normal file
15
migrations/V0002__create_users.sql
Normal file
@ -0,0 +1,15 @@
|
||||
CREATE TABLE IF NOT EXISTS users
|
||||
(
|
||||
id uuid DEFAULT gen_random_uuid() NOT NULL,
|
||||
first_name varchar(50),
|
||||
last_name varchar(50),
|
||||
city_id uuid
|
||||
CONSTRAINT users_cities_id_fk
|
||||
REFERENCES cities (id),
|
||||
created_at timestamp WITH TIME ZONE DEFAULT NOW() NOT NULL,
|
||||
updated_at timestamp WITH TIME ZONE DEFAULT NOW() NOT NULL,
|
||||
sa_orm_sentinel uuid
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS users_id_uindex
|
||||
ON users (id);
|
||||
Reference in New Issue
Block a user