Movie Likes

Setup local development

  • Migrate

    brew install golang-migrate
  • Sqlc

    brew install sqlc

Setup local infra

I have used local postgres set up not docker. But I will try to update that as well in coming days. You have to create database schema by name "movieDB". It's up to you can change the name as well. But do change all other references too.

  • Run db migration down all versions:

    make migrateup

How to generate code

  • Generate SQL CRUD with sqlc:

    make sqlc
  • Create a new db migration:

    migrate create -ext sql -dir db/migration -seq <migration_name>
  • Run test cases

    make test