localprojects / Change-By-Us

A new way to share ideas, do projects, and make our cities better
changeby.us
Other
55 stars 27 forks source link

Unknown column 'project_need.subtype' in 'field list' #21

Open cvee opened 12 years ago

cvee commented 12 years ago

Creating a project results in the error:

(OperationalError) (1054, "Unknown column 'project_need.subtype' in 'field list'") 'SELECT project_need.id AS project_need_id, project_need.type AS project_need_type, project_need.subtype AS project_need_subtype, project_need.request AS project_need_request, project_need.quantity AS project_need_quantity, project_need.description AS project_need_description, project_need.address AS project_need_address, project_need.date AS project_need_date, project_need.time AS project_need_time, project_need.duration AS project_need_duration, project_need.project_id AS project_need_project_id, project_need.event_id AS project_need_event_id \nFROM project_need \nWHERE %(param_1)s = project_need.project_id ORDER BY project_need.id DESC' {'param_1': 1L}

Python /home/cbu/cbudc/.env/local/lib/python2.7/site-packages/MySQLdb/connections.py in defaulterrorhandler, line 35 Web GET http://cbudc.istrategylabs.com:8080/project/1

In sql/models.sql the 'project_need' CREATE TABLE block is missing the definition of the 'subtype' column.

cybertoast commented 12 years ago

Hi Chris, Looks like you may not have run the migrations since giveaminute/migrations/versions/009_Add_a_sub-type_field_to_the_project_need_table.py adds this column.

See https://github.com/localprojects/Change-By-Us/wiki/Data-and-Schema-Migrationsfor instructions.

On Fri, Jan 6, 2012 at 4:20 PM, Chris Verwymeren < reply@reply.github.com

wrote:

Creating a project results in the error:

(OperationalError) (1054, "Unknown column 'project_need.subtype' in 'field list'") 'SELECT project_need.id AS project_need_id, project_need.type AS project_need_type, project_need.subtype AS project_need_subtype, project_need.request AS project_need_request, project_need.quantity AS project_need_quantity, project_need.description AS project_need_description, project_need.address AS project_need_address, project_need.date AS project_need_date, project_need.time AS project_need_time, project_need.duration AS project_need_duration, project_need.project_id AS project_need_project_id, project_need.event_id AS project_need_event_id \nFROM project_need \nWHERE %(param_1)s = project_need.project_id ORDER BY project_need.id DESC' {'param_1': 1L}

Python /home/cbu/cbudc/.env/local/lib/python2.7/site-packages/MySQLdb/connections.py in defaulterrorhandler, line 35 Web GET http://cbudc.istrategylabs.com:8080/project/1

In sql/models.sql the CREATE TABLE project_need block is missing the definition of the subtype column.


Reply to this email directly or view it on GitHub: https://github.com/localprojects/Change-By-Us/issues/21

cvee commented 12 years ago

I ran the migration and things seem to be working correctly now.

In Data and Schema Migrations I came across the section "Regenerating models.sql" which states: "After you've written a new set of migrations, you'll want to generate a new models.sql file for the project." Should model.sql be regenerated and committed to the repository in order to incorporate the migrations in giveaminute/migrations?

cybertoast commented 12 years ago

That statement can be ignored for now. I think it's best that we go down the path of using migrations as they are since this keeps things backwards compatible better. I realize it adds a bit more pain for new-comers, but it makes one more comfortable with the migration process as well. But I'm open to suggestions if you think it's too painful. I've been thinking about how to make the entire install much less of a headache for new cities.

On Fri, Jan 6, 2012 at 5:10 PM, Chris Verwymeren < reply@reply.github.com

wrote:

I ran the migration and things seem to be working correctly now.

In Data and Schema Migrations I came across the section "Regenerating models.sql" which states: "After you've written a new set of migrations, you'll want to generate a new models.sql file for the project." Should model.sql be regenerated and committed to the repository in order to incorporate the migrations in giveaminute/migrations?


Reply to this email directly or view it on GitHub:

https://github.com/localprojects/Change-By-Us/issues/21#issuecomment-3391644