/go_notion

https://codingchallenges.fyi/challenges/challenge-notion

Primary LanguageGo

Setup

  1. Useful tools to install
  1. Running the backend tests:
just backend_test

Contributing:

  1. Creating a new migration

In the backend directory, run:

migrate create -ext sql -dir db/migrations/sql -seq <migration_name>
  1. Fixing a migration

In the backend directory: when you encounter the following error when a migration is faulty

error: Dirty database version 2. Fix and force version.

run the following command:

migrate -database "your_database_url" -path db/migrations/sql force 1

then:

migrate -path db/migrations/sql -database "your_database_url" up