Files
crypto/backend/api/db/migrations/schema.yml
2021-06-28 23:15:13 -04:00

90 lines
1.9 KiB
YAML

name: crypto
tables:
- name: coins
columns:
- name: id
type: int
unsigned: true
auto_increment: true
- name: code
type: varchar(5)
- name: name
type: varchar(200)
- name: ref_url
type: text
primary_key: id
- name: locations
columns:
- name: id
type: int
unsigned: true
auto_increment: true
- name: name
type: varchar(100)
- name: description
type: varchar(200)
primary_key: id
- name: transactions
columns:
- name: id
type: int
unsigned: true
auto_increment: true
- name: date_time
type: datetime
- name: coin_id
type: int
unsigned: true
- name: wallet_id
type: int
unsigned: true
- name: amount
type: double
- name: value
type: double
- name: unit_id
type: int
unsigned: true
primary_key: id
foreign_keys:
- table: coins
local_column: coin_id
foreign_column: id
- table: wallets
local_column: wallet_id
foreign_column: id
- table: coins
local_column: unit_id
foreign_column: id
- name: values
columns:
- name: id
type: int
unsigned: true
auto_increment: true
- name: date_time
type: datetime
- name: coin_id
type: int
unsigned: true
- name: value
type: double
- name: unit_id
type: int
unsigned: true
primary_key: id
foreign_keys:
- table: coins
local_column: coin_id
foreign_column: id
- table: coins
local_column: unit_id
foreign_column: id
- name: wallets
columns:
- name: id
- name: name
- name: location_id
- name: public_address
primary_key: id