Somehow they got corrupted. To repair: 1) make sure the define_table 
structure matches the tables as defined in the the database; 2) set 
fake_migrate=True. Once it works remove fake_migrate=True and add 
enable_migrate=False (do not touch them any more).

On Thursday, 22 October 2015 11:44:50 UTC-5, Sébastien wrote:
>
> Might this be a bug on GAE? Could someone confirm that on GAE migration is 
> fine?
>
> On Saturday, 17 October 2015 13:13:21 UTC+2, Sébastien wrote:
>>
>> Hello,
>>
>> I am working locally on GAE (with Cloud SQL) and I can't seem to be able 
>> to add a new field to a table. I keep having  'xxx.table appears corrupted' 
>> messages.
>>
>> This is what I do before getting the error.
>>
>>
>> 1. To begin with I have:
>>
>> DAL('google:sql:xxx:xxx/xxx’, migrate_enabled = False, migrate=False)
>> db.define_table('test', Field('name'))
>>
>> ---> everything all right
>>
>> 2. Then I change DAL connexion:
>> DAL('google:sql:xxx:xxx/xxx’, migrate_enabled = True, migrate=False)
>>
>> 3, And update define_table with a new field + a migrate name
>> db.define_table('test', Field('name'), Field('another'), 
>> migrate='test.table')
>>
>> ---> I get the following error:
>>
>> […]/gluon/packages/dal/pydal/adapters/base.py:1370: Warning: Can't create 
>> database 'silentdrop'; database exists
>>   ret = self.cursor.execute(command, *a[1:], **b)
>> […]/gluon/packages/dal/pydal/adapters/base.py:1370: Warning: Table 
>> 'web2py_filesystem' already exists
>>   ret = self.cursor.execute(command, *a[1:], **b)
>> ERROR    2015-10-17 11:06:35,531 restricted.py:174] Traceback (most 
>> recent call last):
>>   File "[…]/gluon/restricted.py", line 227, in restricted
>>     exec ccode in environment
>>   File "[…]/applications/xxx/models/xxx.py”, line 35, in <module>
>>     migrate= ‘test.table')
>>   File "[…]/gluon/packages/dal/pydal/base.py", line 834, in define_table
>>     table = self.lazy_define_table(tablename,*fields,**args)
>>   File "[…]/gluon/packages/dal/pydal/base.py", line 873, in 
>> lazy_define_table
>>     polymodel=polymodel)
>>   File "[…]/gluon/packages/dal/pydal/adapters/base.py", line 494, in 
>> create_table
>>     raise RuntimeError('File %s appears corrupted' % table._dbt)
>> RuntimeError: File $HOME/socialTV/databases/test.table appears corrupted
>>
>>
>> I would really appreciate if someone could help me with this as I can't 
>> seem to find a solution.
>> Thank you!
>>
>>
>>

-- 
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