Skip to content

Database Schema

Dayton Chen edited this page Mar 14, 2022 · 9 revisions

PokeFlex

trainers

column name column type constraints
id integer not null, primary key
username varchar not null, unique
password string not null
emailAddress varchar not null, unique
created_at datetime not null
updated_at datetime not null

pokemons

column name column type constraints
id integer not null, primary key
name string not null
image string not null
description text not null
type string not null

reviews

column name column type constraints
id integer not null, primary key
review text not null
rating numeric
created_at datetime not null
updated_at datetime not null
trainerId integer not null
pokemonId integer not null
  • trainerId references trainers table
  • pokemonId references pokemons table

catchlists

column name column type constraints
id integer not null, primary key
catchstatus string not null
trainerId integer not null
  • trainerId references trainers table

catchlistJoinPokemons

column name column type constraints
id integer not null, primary key
pokemonId integer not null
catchlistId integer not null
  • pokemonId references pokemons table
  • catchlistId references catchlists table

Clone this wiki locally