#!/bin/bash -xue

# Run this command from the root directory of the distribution.  You
# must install DBIx::Class::Schema::Loader first.

rm -rf sql/pinto.db

sqlite3 sql/pinto.db < sql/pinto.sql

dbicdump -Ilib \
         -o skip_load_external=1 \
         -o dump_directory=lib \
         -o 'use_moose=1' \
         -o 'result_roles=[ qw(Pinto::Role::Schema::Result) ]' \
         Pinto::Schema \
         dbi:SQLite:sql/pinto.db

