2

Example rake file for applying schema scripts and running sql

 1 year ago
source link: https://gist.github.com/BlackCounter/7b42673d875932111c559c937068103d
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Dovetail Automation

Running the rake script below will

  1. Apply all schema scripts ending in .schemascript.xml found in the child schema directory.
  2. Execute all .sql scripts found in the child database directory.

Setup

  1. Edit the rakefile.rb to have your correct database configuration.
  2. If you've installed Dovetail Schema Editor to a non default path you'll need to edit SCHEMAEDITOR_PATH.

If you do not have rake already installed.

  1. Download the ruby installer for Windows.
  2. Go to a command prompt.
  • gem install rake
  1. Add required gems.
  • gem install albacore
  1. Run Rake to build and run unit tests.
  • rake

rake -T will list all available tasks


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK