Skip to content

Commit

Permalink
debug: fixed connection to postgres | create new user functionality w…
Browse files Browse the repository at this point in the history
…orks
  • Loading branch information
theghostmac committed Jul 4, 2023
1 parent 1c185df commit d11c098
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ FROM alpine:latest
EXPOSE 8082

# Set the entrypoint to run Bankie
ENTRYPOINT ["./bankie"]
ENTRYPOINT ["/bankie"]
23 changes: 23 additions & 0 deletions console.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- List contents of account table.
SELECT * FROM account;

-- List all existing tables.
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;

-- Insert value into account table.
INSERT INTO account (first_name, last_name, email, bank_number, balance, created_at)
VALUES ('Ghost', 'Mac', 'macbobbychibuzor@gmail.com', 1234567890, 100.50, NOW());

-- Check type of `balance` column in account table.
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_name = 'account' AND column_name = 'balance';

-- Change type
ALTER TABLE account ALTER COLUMN balance TYPE float8;

-- Delete a row
DELETE FROM account WHERE id = 2;

0 comments on commit d11c098

Please sign in to comment.