This is my sql.log

timestamp: 2020-08-17T13:02:34.812000
CREATE TABLE auth_user(
    id INT IDENTITY PRIMARY KEY,
    first_name VARCHAR(128) NULL,
    last_name VARCHAR(128) NULL,
    email VARCHAR(512) NULL,
    username VARCHAR(128) NULL,
    password VARCHAR(512) NULL,
    registration_key VARCHAR(512) NULL,
    reset_password_key VARCHAR(512) NULL,
    registration_id VARCHAR(512) NULL,
    is_active BIT NULL,
    created_on DATETIME NULL,
    created_by INT  NULL , CONSTRAINT auth_user_created_by__constraint 
FOREIGN KEY (created_by) REFERENCES auth_user (id) ON DELETE CASCADE,
    modified_on DATETIME NULL,
    modified_by INT  NULL , CONSTRAINT auth_user_modified_by__constraint 
FOREIGN KEY (modified_by) REFERENCES auth_user (id) ON DELETE CASCADE
); 

Il giorno lunedì 17 agosto 2020 12:51:56 UTC+2, Andrea Fae' ha scritto:
>
> When I try to migrate sqlite to mssql and execute the command
>
> python web2py.py -S ITAsset -M -P
>
> (ITAsset is the name of application)
>
> I see this error
>
> ProgrammingError: ('42000', u"[42000] [Microsoft][ODBC SQL Server 
> Driver][SQL Server]Introducing FOREIGN KEY constraint 
> 'auth_user_created_by__constraint' on table 'auth_user' 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 
> or index. See previous errors. (1750)")
>
> auth_user is the standard web2py table. So What can I do to permit to this 
> command to create all the tables?
>
>
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/f507f63f-4038-4e28-9604-256541784ed0o%40googlegroups.com.

Reply via email to