Skip to content

Commit

Permalink
Merge pull request #54 from ermasavior/fix/update-configs
Browse files Browse the repository at this point in the history
fix: update distance decimal and missing query param
  • Loading branch information
ermasavior authored Nov 22, 2024
2 parents c477403 + 582f3a9 commit ac1dbc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion db/migrations/20241021113245_create_rides_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CREATE TABLE rides (
pickup_location POINT NOT NULL,
destination POINT NOT NULL,
status INT NOT NULL, -- enum: 1 - 'WAITING_FOR_DRIVER'; 2 - 'CANCELLED'; 3 - 'WAITING_FOR_PICKUP'; 4 - 'IN_PROGRESS'; 5 - 'FINISHED'
distance DECIMAL(6, 2),
distance DECIMAL(10, 6),
fare DECIMAL(10, 2),
final_price DECIMAL(10, 2),
start_time TIMESTAMP,
Expand Down
4 changes: 2 additions & 2 deletions internal/rides/repository/postgres/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const (
WHERE %s
`
queryInsertRideCommission = `
INSERT INTO ride_commissions(ride_id, commission)
VALUES($1, $2)
INSERT INTO ride_commissions(ride_id, platform_fee, driver_commission)
VALUES($1, $2, $3)
`
)

0 comments on commit ac1dbc2

Please sign in to comment.