[web2py] Re: DAL Could not create constraint or index

2020-08-21 Thread Andrea Fae'
...but this error is not clear with me Error ticket for "ITAsset"Ticket ID 127.0.0.1.2020-08-21.09-54-23.77579ea3-20b8-49ca-aed5-76c10960c92f ('23000', u"[23000] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'id', table 'itassetdb.dbo.asset_archive';

[web2py] Re: DAL Could not create constraint or index

2020-08-21 Thread Andrea Fae'
I think the problem with archiving is when I defined archive table in mssql I defined a field named 'current_record" type int. Maybe type int is not correct, isn't it? Thank you Il giorno venerdì 21 agosto 2020 09:43:14 UTC+2, Andrea Fae' ha scritto: > > Hello, some updates. > In the databases

[web2py] Re: DAL Could not create constraint or index

2020-08-21 Thread Andrea Fae'
Hello, some updates. In the databases I can see only this (see attachment). I'm trying to manage record versionin (table archiving). I create for example asset.archive in mssql but web2py doesn't "see" the table. In fact the table is not listend in the appadmin page. The question is that tables

[web2py] Re: DAL Could not create constraint or index

2020-08-20 Thread Andrea Fae'
UPDATES in appconfig.ini I changed from migrate= true to migrate=false. tha system doesn't create me the sql.log and .table file definitions in the folder databases, but the application seems start to work! How is posisble? Il giorno giovedì 20 agosto 2020 16:45:35 UTC+2, Andrea Fae' ha

[web2py] Re: DAL Could not create constraint or index

2020-08-20 Thread Andrea Fae'
Hello Villas, first al all...thank you thank you thank you! But I didn't arrived to the end of the game yet. but I think I'm near with your suggestions. I followed the "easier solution" and, with a lot of effort, now I have my MSSQL database filled of my data. But when I start tha application

[web2py] Re: DAL Could not create constraint or index

2020-08-19 Thread villas
*An easier solution for you could be this!* Simply specify your created_by/modified_by as extra fields (which should side-step self-referencing probem). I didn't test it, but it seems like a good idea to me. You can then use normal migrations etc. auth.settings.extra_fields['auth_user']= [

[web2py] Re: DAL Could not create constraint or index

2020-08-19 Thread Andrea Fae'
Hello Villas, unfortunately other problems to this game... I used archiving, and so this type of table definitions db.define_table('asset_archive', Field('current_record', db.asset), db.asset,migrate='asset_archive.table') but I have the same problem regarding

[web2py] Re: DAL Could not create constraint or index

2020-08-18 Thread villas
I presume therefore that you need those fields. This is the kind of thing I do to get things working. Please forgive me if I've missed something. - I would create those required fields manually in your database (without the constraint that causes the problem). - Set

[web2py] Re: DAL Could not create constraint or index

2020-08-18 Thread Andrea Fae'
Thank you Villas. I'm using option 2 and now I have the tables without "created_by" and "modified_by". Now I will try to reset signature=true and see what will happen. If it causes the same error I could add but they will not managed automatically by web2py, or I'm wrong? What do you suggest?

[web2py] Re: DAL Could not create constraint or index

2020-08-17 Thread villas
Hi Andrea I was pleased to see you are making progress with the DB connection etc. I can see why mssql does not like the cascade from the same auth_user table. This may be an issue which needs fixing... To get things moving, and this might not be ideal, but I propose you consider either of

[web2py] Re: DAL Could not create constraint or index

2020-08-17 Thread Andrea Fae'
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