DESCRIPTION

Manages your database.

options

--print

Rather than actually running the database create/update/drop commands, Prints the commands to standard output

--create-database

Send a CREATE DATABASE command. Note that --setup, below, will automatically send a CREATE DATABASE if it needs one. This option is useful if you wish to create the database without creating any tables in it.

--drop-database

Send a DROP DATABASE command. Use this in conjunction with --setup to wipe and re-install the database.

--setup

Actually set up your app's tables. This creates the database if need be, and runs any commands needed to bring the tables up to date; these may include CREATE TABLE or ALTER TABLE commands. This option is assumed if the database does not exist, or the database version is not the same as the application's version.

--ignore-reserved-words

Ignore any SQL reserved words used in table or column definitions, if this option is not used and a reserved word is found it will cause an error.

--no-bootstrap

don't run Bootstrap, mostly to get rid of creating initial data

--help

Print a brief help message and exits.

--man

Prints the manual page and exits.

DESCRIPTION

Looks for all model classes of your Jifty application and generates SQL statements to create or update database tables for all of the models. It either prints the SQL to standard output (--print) or actually issues the CREATE TABLE or ALTER TABLE statements on Jifty's database.

(Note that even if you are just displaying the SQL, you need to have correctly configured your Jifty database in ProjectRoot/etc/config.yml, because the SQL generated may depend on the database type.)

By default checks for SQL reserved words in your table names and column definitions, throwing an error if any are found.

If you want to permanently turn this behaviour off you can set CheckSchema to 0 in the database section of your applications config file.

BUGS

Due to limitations of DBIx::DBSchema, this probably only works with PostgreSQL, MySQL and SQLite.