Rails -- Possible to run migration methods in generic rake task? -
I know this is not the best practice, and most likely should not be used as well, for migrations Is used, but I was wondering if it is possible to execute migration specific orders in regular RAK work. Something like this:
Namespace: Working Dummy: Update = & gt; : Add Environment Addition: User, Deleted: Boolean, {: Zero = & gt; Wrong, default = & gt; Wrong} end of end
thanks
it is possible to run your Arbitrary proxy-migration in rack works:
Namespace: Working Dummy: Update = & gt; : Environmental ActiveRecord :: Base.connection.add_column: User, Deleted ,: Boolean,: Cord = & gt; Wrong, default = & gt;
If you are doing a lot of this type, use a short-hand:
Namespace: Working Dummy: Update = & gt ; : Environment do c = ActiveRecord :: Base.Connect c.add_column: User, deleted ,: Boolean,: Cord = & gt; Wrong, default = & gt; Incorrect end and
Comments
Post a Comment