-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/104/add working user and admin dashboard (#132)
- Loading branch information
Showing
30 changed files
with
2,011 additions
and
418 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
backend/.sqlc/migrations/20241114031509_project_questions.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; | ||
|
||
CREATE TABLE project_sections ( | ||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4() NOT NULL, | ||
project_id UUID NOT NULL REFERENCES projects(id) ON DELETE CASCADE, | ||
title VARCHAR(255) NOT NULL, | ||
created_at TIMESTAMP DEFAULT NOW(), | ||
updated_at TIMESTAMP DEFAULT NOW() | ||
); | ||
|
||
CREATE TABLE project_questions ( | ||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4() NOT NULL, | ||
section_id UUID NOT NULL REFERENCES project_sections(id) ON DELETE CASCADE, | ||
question_text TEXT NOT NULL, | ||
answer_text TEXT NOT NULL, | ||
created_at TIMESTAMP DEFAULT NOW(), | ||
updated_at TIMESTAMP DEFAULT NOW() | ||
); | ||
|
||
CREATE INDEX idx_project_sections_project ON project_sections(project_id); | ||
CREATE INDEX idx_project_questions_section ON project_questions(section_id); | ||
-- +goose StatementEnd | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
DROP TABLE project_questions; | ||
DROP TABLE project_sections; | ||
-- +goose StatementEnd |
22 changes: 22 additions & 0 deletions
22
backend/.sqlc/migrations/20244119000000_add_company_metadata.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
ALTER TABLE companies | ||
ADD COLUMN industry VARCHAR(100), | ||
ADD COLUMN company_stage VARCHAR(50), | ||
ADD COLUMN founded_date DATE; | ||
|
||
-- Create indexes for common queries | ||
CREATE INDEX idx_companies_industry ON companies(industry); | ||
CREATE INDEX idx_companies_company_stage ON companies(company_stage); | ||
-- +goose StatementEnd | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
DROP INDEX idx_companies_company_stage; | ||
DROP INDEX idx_companies_industry; | ||
|
||
ALTER TABLE companies | ||
DROP COLUMN industry, | ||
DROP COLUMN company_stage, | ||
DROP COLUMN founded_date; | ||
-- +goose StatementEnd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.