Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- thufir@ARRAKIS:~/projects/rss2mysql$
- thufir@ARRAKIS:~/projects/rss2mysql$ rake
- (in /home/thufir/projects/rss2mysql)
- == CreateUrls: migrating =====================================================
- -- create_table(:urls)
- -> 0.0450s
- rake aborted!
- An error has occurred, all later migrations canceled:
- uninitialized constant CreateUrls::Url
- /home/thufir/projects/rss2mysql/rakefile:9
- (See full trace by running task with --trace)
- thufir@ARRAKIS:~/projects/rss2mysql$
- thufir@ARRAKIS:~/projects/rss2mysql$ nl rakefile
- 1 require 'active_record'
- 2 require 'yaml'
- 3 task :default => :migrate
- 4 desc "Migrate the database through scripts in db/migrate. Target specific version with VERSION=x"
- 5 task :migrate => :environment do
- 6 ActiveRecord::Migrator.migrate('db/migrate', ENV["VERSION"] ? ENV["VERSION"].to_i : nil )
- 7 end
- 8 task :environment do
- 9 db = YAML::load(File.open('database.yml'))
- 10 ActiveRecord::Base.establish_connection(
- 11 :adapter => db["development"]["adapter"],
- 12 :host => db["development"]["host"],
- 13 :username => db["development"]["username"],
- 14 :password => db["development"]["password"],
- 15 :database => db["development"]["database"])
- 16 ActiveRecord::Base.logger = Logger.new(File.open('sql.log', 'w'))
- 17 end
- thufir@ARRAKIS:~/projects/rss2mysql$
- thufir@ARRAKIS:~/projects/rss2mysql$ cat sql.log
- SQL (0.5ms) SET SQL_AUTO_IS_NULL=0
- SQL (0.8ms) SHOW TABLES
- SQL (38.4ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
- SQL (7.3ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
- SQL (0.8ms) SHOW TABLES
- SQL (0.9ms) SELECT version FROM schema_migrations
- Migrating to CreateUrls (1)
- SQL (43.5ms) CREATE TABLE `urls` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `url` varchar(255)) ENGINE=InnoDB
- thufir@ARRAKIS:~/projects/rss2mysql$
Add Comment
Please, Sign In to add comment