it's the usual error from MSSQL with cascading FK.
I didn't really follow wiki's development so by the time it got into the
core it was already too late to suggest a different model.
The concise (but ugly) workaround is
for key in ['reference','reference FK']:
db._adapter.types[key]=db._adapter.types[key].replace('
%(on_delete_action)s','NO ACTION')
before the auth.wiki call.
You can leave that piece of code in just for the first request that creates
the tables, than remove it.
On Sunday, April 27, 2014 6:01:25 AM UTC+2, pallav wrote:
>
> I tried to enable wiki by doing the following:
> def index():
> return auth.wiki()
>
> This breaks the app with the following error:
> [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]IntroducingFOREIGN KEY
> constraint
> 'wiki_page_modified_by__constraint' on table 'wiki_page' may cause cycles
> or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO
> ACTION, or modify other FOREIGN KEY constraints. (1785) (SQLExecDirectW);
> [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Could not create
> constraint. See previous errors. (1750)
>
>
> The error is happening because the foreign key contraints on auth_wiki
> pages should be specified as 'no action' on delete and update. Has anyone
> else seen the problem? Am I missing something obvious or is this a bug that
> I should submit a patch for?
>
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.