Hi,
why are you using fake_migrate?
it rebuilds web2py metadata.

Paolo
On Thursday, January 22, 2015 at 6:25:10 AM UTC+1, Dmitry Ermolaev wrote:
>
> <class 'sqlite3.OperationalError'> no such table: cp_mods
> Versionweb2py™Version 2.9.12-stable+timestamp.2015.01.17.06.11.03PythonPython 
> 2.7.8: C:\Python27\python.exe (prefix: C:\Python27)Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
> 16.
> 17.
> 18.
> 19.
>
> Traceback (most recent call last):
>   File "C:\web2py-9-12\gluon\restricted.py", line 224, in restricted
>     exec ccode in environment
>   File "C:/web2py-9-12/applications/bs3b/models/db.py" 
> <http://127.0.0.1:8000/admin/default/edit/bs3b/models/db.py>, line 615, in 
> <module>
>     if len(db(db.cp_mods).select()) == 0:
>   File "C:\web2py-9-12\gluon\dal\objects.py", line 2066, in select
>     return adapter.select(self.query,fields,attributes)
>   File "C:\web2py-9-12\gluon\dal\adapters\sqlite.py", line 125, in select
>     return super(SQLiteAdapter, self).select(query, fields, attributes)
>   File "C:\web2py-9-12\gluon\dal\adapters\base.py", line 1232, in select
>     return self._select_aux(sql,fields,attributes)
>   File "C:\web2py-9-12\gluon\dal\adapters\base.py", line 1197, in _select_aux
>     self.execute(sql)
>   File "C:\web2py-9-12\gluon\dal\adapters\base.py", line 1319, in execute
>     return self.log_execute(*a, **b)
>   File "C:\web2py-9-12\gluon\dal\adapters\base.py", line 1313, in log_execute
>     ret = self.cursor.execute(command, *a[1:], **b)
> OperationalError: no such table: cp_mods
>
>
> code:
>     db = DAL("sqlite://storage.sqlite", # on PC locals
>         folder='applications/shop/databases',
>         pool_size=0,
>         migrate=True,
>         fake_migrate=True,
>         check_reserved=['all'],
>         )
> db.define_table('cp_mods', # вакансии
>     Field('cms', length=30),
>     fake_migrate=True,
>     redefine=True,
>     )
> if len(db(db.cp_mods).select()) == 0:
>        db.cp_mods.truncate()
>        db.cp_mods[0] = dict(cms = '_unknown_')
> ===
> my other tables is exist
>

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