Schema Creation

If you downloaded the SQL file from the PostgreSQL Exercises site, then you can load the data into a PostgreSQL database using the following commands:

  1. createdb peewee_test
  2. psql -U postgres -f clubdata.sql -d peewee_test -x -q

To create the schema using Peewee, without loading the sample data, you can run the following:

  1. # Assumes you have created the database "peewee_test" already.
  2. db.create_tables([Member, Facility, Booking])