Permalink
Browse files

Working on creating a generator for the migrations.

  • Loading branch information...
1 parent 8fc4bf8 commit 8d905377847e485230fb7552dadbb2aa2f8cb0cd @markbates markbates committed Jul 26, 2009
View
@@ -7,6 +7,8 @@ Gemstub.gem_spec do |s|
s.version = "0.1.1"
s.rubyforge_project = "magrathea"
s.add_dependency('configatron')
+ s.email = 'mark@markbates.com'
+ s.homepage = 'http://www.metabates.com'
end
Gemstub.rdoc do |rd|
@@ -1,4 +1,4 @@
-class CreateApnDevices < ActiveRecord::Migratio # :nodoc:
+class CreateApnDevices < ActiveRecord::Migration # :nodoc:
def self.up
create_table :apn_devices do |t|
t.text :token, :size => 71, :null => false
@@ -0,0 +1,11 @@
+require 'rails_generator'
+class ApnMigrationsGenerator < Rails::Generator::Base
+ def manifest
+ record do |m|
+ # m.template "rebba_tasks.rake", "lib/tasks/rebba_tasks.rake", :collision => :force
+ #{fixtures}
+ #{mts}
+
+ end
+ end
+end
@@ -1,11 +1,17 @@
namespace :apn do
namespace :db do
-
- desc 'Runs the migrations for apn_on_rails.'
- task :migrate => [:environment] do
- puts File.join(File.dirname(__FILE__), '..', '..', 'apn_on_rails', 'db', 'migrate')
- ActiveRecord::Migrator.up(File.join(File.dirname(__FILE__), '..', '..', 'apn_on_rails', 'db', 'migrate'))
+
+ task :migrate do
+ puts %{
+This task no longer exists. Please generate the migrations like this:
+
+$ ruby script/generate apn_migrations
+
+Then just run the migrations like you would normally:
+
+$ rake db:migrate
+ }.strip
end
end # db

0 comments on commit 8d90537

Please sign in to comment.