diff --git a/Dockerfile b/Dockerfile index fd19b22..ac0942c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,4 +25,4 @@ FROM alpine:latest EXPOSE 8082 # Set the entrypoint to run Bankie -ENTRYPOINT ["./bankie"] \ No newline at end of file +ENTRYPOINT ["/bankie"] \ No newline at end of file diff --git a/console.sql b/console.sql new file mode 100644 index 0000000..d33704b --- /dev/null +++ b/console.sql @@ -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;