Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE USER username WITH PASSWORD 'password';
- CREATE DATABASE database;
- GRANT ALL PRIVILEGES ON DATABASE database to username;
- CREATE TABLE IF NOT EXISTS USERS (
- id SERIAL PRIMARY KEY,
- name TEXT NOT NULL,
- created_at DATE NOT NULL,
- updated_at DATE NOT NULL
- CREATE TABLE IF NOT EXISTS POSTS (
- id SERIAL PRIMARY KEY,
- created_at DATE NOT NULL,
- updated_at DATE NOT NULL,
- users_id INT references USERS(id)
- );
Add Comment
Please, Sign In to add comment