Eric
class MoleTables < ActiveRecord::Migration
def self.up
create_table :mole_features do |t|
t.column "name", :string
t.column "context", :string
t.column "app_name", :string
t.column "create_at", :timestamp
t.column "update_at", :timestamp
end
create_table :mole_logs do |t|
t.column "mole_feature_id", :integer
t.column :user_id, :integer
t.column "params", :string
t.column "ip_address", :string
t.column "browser_type", :string
t.column "created_at", :timestamp
t.column "updated_at", :timestamp
end
add_index :mole_features, [:name]
end
def self.down
#remove_index :mole_features, [:name]
drop_table :mole_logs
drop_table :mole_features
end
end
You should be able to invoke the mole rake command from the root
of your application as
RAILS_ENV=production rake mole:install
To populate the mole schema in your prod env.
-Fernand
At any rate, having it as a migration means we can run our "cap
deploy" task as normal and have the tables created, versus doing
something custom. Still like to see the plugin create the table for
me if it doesn't exist!