Skip to content

Commit

Permalink
add owner id
Browse files Browse the repository at this point in the history
  • Loading branch information
aidantrabs committed Dec 15, 2024
1 parent 86a2cc7 commit 8fa99b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/.sqlc/migrations/20241215194302_initial_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ CREATE TABLE IF NOT EXISTS verify_email_tokens (

CREATE TABLE IF NOT EXISTS companies (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
owner_id uuid NOT NULL REFERENCES users(id),
name varchar NOT NULL,
wallet_address varchar,
linkedin_url varchar NOT NULL,
Expand Down Expand Up @@ -124,6 +125,7 @@ CREATE TABLE IF NOT EXISTS transactions (
);

CREATE INDEX IF NOT EXISTS idx_users_email ON users(email);
CREATE INDEX IF NOT EXISTS idx_companies_owner ON companies(owner_id);
CREATE INDEX IF NOT EXISTS idx_projects_company ON projects(company_id);
CREATE INDEX IF NOT EXISTS idx_project_answers_project ON project_answers(project_id);
CREATE INDEX IF NOT EXISTS idx_transactions_project ON transactions(project_id);
Expand Down

0 comments on commit 8fa99b6

Please sign in to comment.