-- Copyright 2024 StarfleetAI -- SPDX-License-Identifier: Apache-2.0 CREATE TABLE users ( id SERIAL PRIMARY KEY, company_id INTEGER REFERENCES companies(id) NOT NULL, first_name TEXT NOT NULL, last_name TEXT NOT NULL, created_at TIMESTAMP WITH TIME ZONE NOT NULL, updated_at TIMESTAMP WITH TIME ZONE NOT NULL ); CREATE INDEX index_users_on_company_id ON users (company_id);