https://github.com/knands42/concurrency-banking
An application that simulates a banking system in order to deal with concurrency at the database layer
https://github.com/knands42/concurrency-banking
docker docker-compose golang makefile postgresql
Last synced: 2 months ago
JSON representation
An application that simulates a banking system in order to deal with concurrency at the database layer
- Host: GitHub
- URL: https://github.com/knands42/concurrency-banking
- Owner: knands42
- Created: 2022-08-28T03:12:06.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-25T05:03:22.000Z (almost 2 years ago)
- Last Synced: 2025-02-24T03:18:01.986Z (over 1 year ago)
- Topics: docker, docker-compose, golang, makefile, postgresql
- Language: Go
- Homepage:
- Size: 299 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bank-Transaction
An application to learn golang and focusing in databases
### Running the application
To run the application first mak sure to have the `make` cli tool installed.
Then just enter the following command:
```bash
make execute
```
### Migrations
To generate new migrations just hit the code below:
```shell
make create_migration file_name=example_schema
```
A new file should be created under `app/internal/db/migrations` with the name `000002_schema_migration_up.sql` and `000002_schema_migration_down.sql`.
After editing these two sql files just hit the code below to apply.
```shell
make migrate_up
make migrate_down
```
### QUERIES
To generate new code for the queries located at `app/internal/db/queries`, first make sure that you have the sqlc tool installed.
```shell
go install github.com/kyleconroy/sqlc/cmd/sqlc@latest
```
After that just hit the code below:
```shell
make query
```
Files under `app/internal/db/sqlc` should be generated (DO NOT EDIT), they are like CRUD automatically generated from .sql files.
### Credits
Project made with the guide of [TECH SCHOOL](https://www.youtube.com/watch?v=rx6CPDK_5mU&list=PLy_6D98if3ULEtXtNSY_2qN21VCKgoQAE&ab_channel=TECHSCHOOL) tutorial.