btwebdev

Activity Graph

Page 1 of 1

2016-02-15

[17:26:44] btwebdev: has joined #RubyOnRails
[17:27:08] btwebdev: do rails models need to coincide w/migrations?
[17:27:19] btwebdev: i'm adding a column via a migration, and then adding data to that column
[17:27:40] btwebdev: but it's saying 'unknown attribute' when i try to run the migration that adds data to the table
[17:29:23] btwebdev: so migration 1 add_column :table_name, :msg_type, :string
[17:29:46] btwebdev: well when i check mysql, migration 1 has successfully created the column
[17:30:11] btwebdev: and then migration 2is just Module::Model.create! field1: 'xyz', field2: 'abc'
[17:30:20] btwebdev: restart between migrations?
[17:30:58] btwebdev: so, migration 1 completes successfully. restart server and run migration 2 = success. but if i drop my DB and try to run all migrations it fails
[17:31:02] btwebdev: is that column list cached?
[17:31:27] btwebdev: saw something a few years back on reset_column_somethingorother
[17:31:32] btwebdev: but can't find that in current AR docs
[17:32:39] btwebdev: weird, didn't find that article. thanks will look.
[17:33:36] btwebdev: so should it be Module::Model.reset_column_information?
[20:53:15] btwebdev: Quit: Page closed

2016-02-12

[20:18:48] btwebdev: has joined #ruby
[20:21:13] btwebdev: is there a way to convert this time format to 2015-12-14T14:05:26+0000 to 2015-12-14 02:05:25 with ruby's Time?
[23:05:33] btwebdev: Ping timeout: 252 seconds