Looks like the new fields didn't get added to the database. Do you have 
migrations turned off?

On Monday, March 10, 2014 7:56:11 PM UTC-4, sujin...@gmail.com wrote:
>
> I had made MXPDEVICE table, and I added MXPPCPLATFORM table yesterday.
> Then definition of MXPDEVICE changed as below (Red part).
>
> -------------------------------------------------------------------------------------------------------------------------
> db.define_table('MXPDEVICE',
>     Field('NAME','string', notnull=True, label='Device'),
>     Field('MODEL_NO','string', required=True),
>     Field('PLATFORM_ID', db.MXPPLATFORM, ondelete='NO ACTION', 
> required=True, label='Platform'),
>     Field('PLATFORM_VERSION',required=True),
>     Field('PC_PLATFORM_ID', db.MXPPCPLATFORM, ondelete='NO ACTION', 
> required=True, label='PC Platform'),
>     Field('PC_PLATFORM_VERSION',required=True),
>     Field('DEVICE_INFO', 'text', required=True),
>     Field('DEFAULT_TESTER_ID', db.MXPTESTER, required=True, ondelete='NO 
> ACTION', label = 'Tester'),
>     Field('DEFAULT_TEST_DEVICE_YN', 'boolean', default=True),
>     Field('USE_YN', 'boolean', default=True, writable=False, readable = 
> False ),
>     Field('CREATED_ON',  'datetime', default=request.now,  writable=False 
> ),
>     Field('UPDATED_ON',  'datetime', update=request.now,  writable=False 
>  ))
>
> -------------------------------------------------------------------------------------------------------------------------
>
> and then I got Error......
> =======================================================================
> Database db <https://165.243.187.146:8084/mxpTest/appadmin/index> select
> Traceback
>
>     Traceback (most recent call last):
>   File "/home/mxptest/web2py/applications/mxpTest/controllers/appadmin.py", 
> line 270, in select
>     *fields, limitby=(start, stop))
>   File "/home/mxptest/web2py/gluon/dal.py", line 10335, in select
>     return adapter.select(self.query,fields,attributes)
>   File "/home/mxptest/web2py/gluon/dal.py", line 1831, in select
>     return self._select_aux(sql,fields,attributes)
>   File "/home/mxptest/web2py/gluon/dal.py", line 1796, in _select_aux
>     self.execute(sql)
>   File "/home/mxptest/web2py/gluon/dal.py", line 1916, in execute
>     return self.log_execute(*a, **b)
>   File "/home/mxptest/web2py/gluon/dal.py", line 1910, in log_execute
>     ret = self.cursor.execute(command, *a[1:], **b)
>   File "/usr/lib/pymodules/python2.7/MySQLdb/cursors.py", line 166, in execute
>     self.errorhandler(self, exc, value)
>   File "/usr/lib/pymodules/python2.7/MySQLdb/connections.py", line 35, in 
> defaulterrorhandler
>     raise errorclass, errorvalue
> OperationalError: (1054, "Unknown column 'MXPDEVICE.PC_PLATFORM_ID' in 'field 
> list'")
>
> =======================================================================
> I thought it's because of migration.
> but even though I changed the option, It wasn't solved.....
>
> Thank you for your answer!!
>
>
> 2014년 3월 10일 월요일 오후 3시 58분 29초 UTC+9, sujin...@gmail.com 님의 말:
>>
>> Hi.
>> I tried adding new columns, but I got that error 1054, "Unknown column in 
>> 'field list'.............
>> As web2py document
>> (set fake_migrate=True and after the metadata has been rebuilt, set
>> fake_migrate=False and migrate the table again).--- I'm using MySQL), I 
>> did it but the problem was not solved.
>> I searched and tried many things... change migration option, delete 
>> .table file etc...  But It didn't work.
>>
>> Is anybody who knows solution? Help meeeeeeeeeeee
>>
>> Thank you so much!!! :)
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to