logilab-database #294041 [sqlserver] crash on column alteration [open]

-> migration needed from 4.4.0 to 5.1.0 for pagode
warning: relation Turbine constant_production_duration Float is already known, skip addition
warning: relation Turbine penalty_constant_production Float is already known, skip addition
sql: 'ALTER TABLE cw_Turbine ALTER COLUMN cw_name nvarchar(max) NOT NULL'
args: None
dbms message: '42000'
Traceback (most recent call last):
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\cwctl.py", line 162, in run_arg
status = cmdmeth(appid)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\cwctl.py", line 787, in upgrade_instance
mih.migrate(vcconf, reversed(toupgrade), self.config)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\server\migractions.py", line 178, in migrate
super(ServerMigrationHelper, self).migrate(vcconf, toupgrade, options)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\migration.py", line 181, in migrate
self.cmd_process_script(script)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\server\migractions.py", line 184, in cmd_process_script
migrscript, funcname, *args, **kwargs)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\migration.py", line 350, in cmd_process_script
execfile(migrscript, scriptlocals)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubes\pagode\migration\5.1.0_Any.py", line 3, in <module>
sync_schema_props_perms('Turbine')
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\migration.py", line 137, in <lambda>
meth=meth)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\migration.py", line 203, in interact
return meth(*args, **kwargs)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\server\migractions.py", line 1171, in cmd_sync_schema_props_perms
self.commit()
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\server\migractions.py", line 291, in commit
self.cnx.commit(free_cnxset=False)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\repoapi.py", line 129, in check_open
return func(clt_cnx, *args, **kwargs)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\repoapi.py", line 224, in commit
return self._cnx.commit(*args, **kwargs)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\server\session.py", line 381, in check_open
return func(cnx, *args, **kwargs)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\server\session.py", line 1106, in commit
operation.handle_event('precommit_event')
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\server\hook.py", line 770, in handle_event
getattr(self, event)()
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\hooks\syncschema.py", line 664, in precommit_event
syssource.update_rdef_column(cnx, rdef)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\server\sources\native.py", line 779, in update_rdef_column
table, column, coltype, allownull)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\logilab\database\sqlserver2005.py", line 296, in change_col_type
cursor.execute(stmt)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\cubicweb\server\sources\native.py", line 80, in execute
self.cu.execute(str(query), args)
File "\\nl1grp1.melinda.local\PYL001A\Labo\TestC_Pylos\logilab\database\sqlserver.py", line 116, in execute
self._cursor.execute(sql)
ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]The object 'utv_cw_turbine_unique_a2b7c6bc86e5766c8e301f82f66b1758' is dependent on column 'cw_name'. (5074) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]ALTER TABLE ALTER COLUMN cw_name failed because one or more objects access this column. (4922)")
instance TestC_Instance not upgraded: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]The object 'utv_cw_turbine_unique_a2b7c6bc86e5766c8e301f82f66b1758' is dependent on column 'cw_name'. (5074) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]ALTER TABLE ALTER COLUMN cw_name failed because one or more objects access this column. (4922)")
C:\WINDOWS>

prioritynormal
typebug
done in<not specified>
closed by<not specified>