Skip to content

Database Schema

Dayton Chen edited this page Jun 20, 2022 · 9 revisions

PokeFlex

users

column name column type constraints
id integer not null, primary key
first_name varchar not null
last_name varchar not null
email 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