-- postgres global
-- CREATE DATABASE testapi WITH ENCODING 'UTF8' LOCALE 'en_US.utf-8' TEMPLATE template0;
-- ALTER DATABASE testapi SET TIMEZONE TO 'UTC';
-- CREATE USER testapi_server WITH PASSWORD 'saladus';

-- inside database
-- GRANT pg_read_all_data TO testapi_server;
-- GRANT pg_write_all_data TO testapi_server;

/***************/
-- DROP TABLE IF EXISTS public.user;
-- CREATE TABLE IF NOT EXISTS public.user (
-- 	id serial PRIMARY KEY,
-- 	key VARCHAR (50) NOT NULL,
-- 	username VARCHAR (50) UNIQUE NOT NULL,
-- 	password VARCHAR (255) NOT NULL,
-- 	email VARCHAR (255) NOT NULL,
-- 	created_at TIMESTAMP NOT NULL default now(),
-- 	updated_at TIMESTAMP,
-- 	last_login TIMESTAMP 
-- );
