CREATE TABLE clients (id SERIAL PRIMARY KEY, name VARCHAR(40), username VARCHAR(25) NOT NULL, password TEXT NOT NULL, key VARCHAR(50) NOT NULL, created_at TIMESTAMP with TIME ZONE DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP with TIME ZONE DEFAULT CURRENT_TIMESTAMP, public BOOLEAN DEFAULT TRUE NOT NULL);
CREATE TABLE events (id SERIAL PRIMARY KEY, user_name VARCHAR(20) NOT NULL, metric VARCHAR(20) NOT NULL, value DECIMAL NOT NULL, client_id INTEGER NOT NULL, created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL, public BOOLEAN DEFAULT TRUE NOT NULL);