doppler

A raw SQL migration tool for managing your database without an ORM
Download

doppler Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Nick Gartmann
  • Publisher web site:
  • http://github.com/nickgartmann/

doppler Tags


doppler Description

doppler is a simple Python tool for managing changes to your database.- doppler is ORM-agnostic- uses raw-SQL scripts as migrations- DBA's can write the scripts, no python knowledge required- gives you complete control over your schemaInstallationInstall using pip:pip install -e git://github.com/nickgartmann/doppler.gitor add to your requirements.txt file-e git://github.com/nickgartmann/doppler.gitSetupIn order for doppler to work, you must have a migrations folder located somewhere in your project directory. Doppler will recurse through your directory structure until it finds a folder named migrations. Otherwise, you can specify a directory while running the cli.UsageGenerate MigrationsThe doppler generate command creates two sql files. The first is run when migrating the database up, the second is for migrating down. Thus, the contents of the *.down.sql file should do the undo the effect of the *.up.sql file.doppler generate < migration name >Example:doppler generate initial-schemaOutputs:Created: ./migrations/001.initial-schema.up.sqlCreated: ./migrations/001.initial-schema.down.sqlApply Migrationsdoppler migrate updoppler migrate downOptionsFolderUse this to specify which folder you keep your migrations in, for if you dont want to use the migrations folder convention.-f, --folder /path/to/migration/folderDatabaseUse this to specify the connection information to your database. This can also be stored in the DATABASE_URL environment variable (standard configuration for heroku.) This should be in a standard database connection url format:database-type://username:password@host:port/databaseTo include the option:-db, --database < database url >Product's homepage


doppler Related Software