Golang sqlc how to auto generate tables based on schema.sql file?

826 views Asked by At

I'm following this tutorial using Golang sqlc with Postgresql, there is an error that says: pq: relation "authors" does not exist exit status 1 whenever I run go run main.go after setting up everything. So the table "authors" is not being generated automatically, how does sqlc generate tables based on the schema.sql file? Do I have to manually copy and paste the code in schema.sql into DBMS SQL script for it to create tables?

0

There are 0 answers