CREATE TABLE articles ( id SERIAL PRIMARY KEY, slug TEXT NOT NULL UNIQUE, title TEXT NOT NULL, description TEXT NOT NULL, body TEXT NOT NULL, author INTEGER NOT NULL REFERENCES users ON DELETE CASCADE, tag_list TEXT[] NOT NULL, created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), favorites_count INTEGER NOT NULL DEFAULT 0 );