Having trouble debugging goose up/down command

41 Views Asked by At

Following project 3 tutorial at https://www.youtube.com/watch?v=un6ZyFkqFKo (around 7:20:00). He suggests using goose to do database migration.

File 001_users.sql:

-- +goose Up
CREATE TABLE users (
    id UUID PRIMARY KEY,
    created_at TIMESTAMP NOT NULL,
    updated_at TIMESTAMP NOT NULL,
    name TEXT NOT NULL
);

-- + goose Down
DROP TABLE users;

Ran from command line:

goose postgres postgres://<user>:<password>@localhost:5432/rssagg up  
2024/02/19 15:59:37 OK   001_users.sql (5.95ms)
2024/02/19 15:59:37 goose: successfully migrated database to version: 1

Check in postgres SQL for the rssagg tables, no users table is created. (even after refresh)

Not sure where to troubleshoot, since I can't seem to find documents to talk about how to troubleshoot goose.

Any ideas?

0

There are 0 best solutions below