You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
901 B
48 lines
901 B
## knd-bank ##
|
|
|
|
Based on dnd_bank ( Bank of Skyfall, D&D Edition )
|
|
https://git.skyfall.tech/ajohnson/dnd_bank
|
|
|
|
This project is solely for training purpose and will not be maintained. Use the Bank of Skyfall.
|
|
|
|
|
|
|
|
|
|
Setup the database:
|
|
|
|
`CREATE TABLE account (id SERIAL UNIQUE, username VARCHAR(50) UNIQUE NOT NULL,timestamp TIMESTAMP,active VARCAHR(1) NOT NULL);`
|
|
|
|
`CREATE TABLE balance (id SERIAL UNIQUE,balance NUMERIC);`
|
|
|
|
`CREATE TABLE transaction (id NUMERIC,username VARCHAR(50),amount NUMERIC,timestamp TIMESTAMP);`
|
|
|
|
|
|
**Create a config file named `ddbank_config` located in the same directory as the script.**
|
|
**Config file should have the following:**
|
|
```
|
|
#Config
|
|
## Starting balance
|
|
bal="00.00"
|
|
|
|
## Postgres
|
|
### Database user
|
|
dbuser="ddbank"
|
|
### Database Port
|
|
dbport="5432"
|
|
### Datavase host
|
|
dbhost="knd-db01.kniod.corp"
|
|
### Database name
|
|
datab="ddbank"
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use script.
|
|
|
|
|
|
Have a good day.
|