CREATE TABLE time_entries ( id BIGINT PRIMARY KEY, workspace_id BIGINT NOT NULL, user_id BIGINT NOT NULL, project_id BIGINT, task_id BIGINT, start TIMESTAMP WITH TIME ZONE NOT NULL, stop TIMESTAMP WITH TIME ZONE, duration INTEGER, updated_at TIMESTAMP WITH TIME ZONE NOT NULL, description TEXT NOT NULL, tag_ids BIGINT[] NOT NULL, billable BOOLEAN NOT NULL, server_deleted_at TIMESTAMP WITH TIME ZONE, permissions TEXT );