Skip to content

Commit

Permalink
Fix entity table name convention
Browse files Browse the repository at this point in the history
  • Loading branch information
emacsway committed Dec 22, 2023
1 parent 0b6985e commit afb072b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type AssignmentInsertQuery struct {

func (q AssignmentInsertQuery) sql() string {
return `
INSERT INTO assignment (
INSERT INTO specialist_assignment (
tenant_id, specialist_id, specialist_version, assigned_grade, reason, created_at
) VALUES ($1, $2, $3, $4, $5, $6)
ON CONFLICT DO NOTHING`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type EndorsementInsertQuery struct {

func (q EndorsementInsertQuery) sql() string {
return `
INSERT INTO endorsement (
INSERT INTO specialist_endorsement (
tenant_id, specialist_id, specialist_grade, specialist_version,
artifact_id, endorser_id, endorser_grade, endorser_version, created_at
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
Expand Down
4 changes: 2 additions & 2 deletions grade/internal/infrastructure/sql/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ CREATE TABLE specialist (
);


CREATE TABLE endorsement (
CREATE TABLE specialist_endorsement (
tenant_id integer NOT NULL,
specialist_id bigint NOT NULL,
specialist_grade smallint NOT NULL DEFAULT 0,
Expand All @@ -194,7 +194,7 @@ CREATE TABLE endorsement (
);


CREATE TABLE assignment (
CREATE TABLE specialist_assignment (
tenant_id integer NOT NULL,
specialist_id bigint NOT NULL,
specialist_version integer NOT NULL,
Expand Down

0 comments on commit afb072b

Please sign in to comment.