Skip to content

Commit

Permalink
feat: Create comments table
Browse files Browse the repository at this point in the history
Closes #7 - created SQL comments table
  • Loading branch information
theNatePi authored Dec 1, 2024
2 parents 98e5cf4 + 3eb6746 commit 9626ec9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions server/db/schema/comments.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE TYPE adjustment AS ENUM ('none', 'total', 'rate_flat', 'rate_percent', 'paid');

CREATE TABLE comments (
id INT PRIMARY KEY UNIQUE NOT NULL DEFAULT nextval('comment_id_seq'),
user_id INT REFERENCES users(id) NOT NULL,
invoice_id INT REFERENCES invoices(id) NOT NULL,
datetime TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
comment TEXT NOT NULL,
adjustment_type adjustment DEFAULT 'none',
adjustment_value NUMERIC DEFAULT 0
);

0 comments on commit 9626ec9

Please sign in to comment.