- Run docker up
docker compose up
-
Install HasuraCLI
-
Open Hasura Console
cd hasura && hasura console
- Modify Data / Authorization / Actions / Remote Schemas / Events
- Hasura Migration (using command)
# Apply all
hasura migrate apply
# Create new migration
hasura migrate create "migration_name" --from-server
# Apply migration without executing (migrate from an existing db)
hasura migrate apply --version "<version>" --skip-execution
# Apply new migration
hasura migrate apply --version "<version>"
Migration status
hasura migrate status
VERSION | NAME | SOURCE | STATUS | DATABASE | STATUS |
---|---|---|---|---|---|
1590493510167 | init | Present | Present | ||
1590497881360 | create_table_public_address | Present | Present |
- Export Metadata
# Export current metadata
hasura metadata export
# Apply metadata
hasura metadata apply
- Add a checkpoint to version control
git add .
git commit -m "initialize migrations and metadata"
- Create seeds
hasura seed create collectionsSeed --from-table products
- Apply seed
# Apply all seeds on the database:
hasura seed apply
# Apply only a particular file:
hasura seed apply --file 1692710119690_productsSeed.sql