Wanderer
2014-07-25, 06:51 PM
I've created new fields in Archibus before, but, haven't done much modifying of existing fields.
I need to modify the default value for a couple of my fields and the records save, but, when I run an update to my database schema, the ones that did not have a default already have saved fine, but, the ones that already had a default saved are failing.
I'm not certain if this is an Archibus thing or a SQL thing. I checked my SQL Bible (just like I did with my AutoCAD Bible :razz: ) but, couldn't find applicable entries just flipping through the index and related chapters.
Here's an excerpt of one of the errors:
Field was changed, prepare the ALTER TABLE statement: space_use
DROP INDEX LS._WA_SYS_00000001_385E379D
DROP INDEX LS._WA_SYS_00000029_385E379D
DROP INDEX LS._WA_SYS_00000031_385E379D
DROP INDEX LS._WA_SYS_00000011_385E379D
DROP INDEX LS._WA_SYS_00000023_385E379D
DROP INDEX LS._WA_SYS_00000020_385E379D
DROP INDEX LS._WA_SYS_00000018_385E379D
DROP INDEX LS._WA_SYS_00000017_385E379D
DROP INDEX LS._WA_SYS_00000015_385E379D
DROP INDEX LS._WA_SYS_00000010_385E379D
DROP INDEX LS._WA_SYS_0000000F_385E379D
DROP INDEX LS._WA_SYS_00000025_385E379D
DROP INDEX LS._WA_SYS_00000046_385E379D
DROP INDEX LS._WA_SYS_00000048_385E379D
Drop Default Value Constraint If Exists For SQLServer
Drop Constraint If Exists For SQLServer
Change Default Value For SQLServer
This operation is postponed:
ALTER TABLE ls ADD CONSTRAINT DF_ls_space_use_default DEFAULT 'RETAIL' FOR space_use
Executing the postponed Schema change
Error details: Column already has a DEFAULT bound to it.
Could not create constraint. See previous errors.
Executing the postponed Schema change
Error details: Column already has a DEFAULT bound to it.
Could not create constraint. See previous errors.
Of course, now that I'm looking back, I thought maybe I should save without a default, then add a different default, but, it looks like the one case which my users wanted left blank failed when I tried to remove the default.
Drop Default Value Constraint If Exists For SQLServer
Drop Constraint If Exists For SQLServer
Change Default Value For SQLServer
This operation is postponed:
ALTER TABLE cost_tran_recur ADD CONSTRAINT DF_cost_tran_recur_date_start_default DEFAULT NULL FOR date_start
I'd appreciate any advice or pointers to the right help file, etc, thanks!
I need to modify the default value for a couple of my fields and the records save, but, when I run an update to my database schema, the ones that did not have a default already have saved fine, but, the ones that already had a default saved are failing.
I'm not certain if this is an Archibus thing or a SQL thing. I checked my SQL Bible (just like I did with my AutoCAD Bible :razz: ) but, couldn't find applicable entries just flipping through the index and related chapters.
Here's an excerpt of one of the errors:
Field was changed, prepare the ALTER TABLE statement: space_use
DROP INDEX LS._WA_SYS_00000001_385E379D
DROP INDEX LS._WA_SYS_00000029_385E379D
DROP INDEX LS._WA_SYS_00000031_385E379D
DROP INDEX LS._WA_SYS_00000011_385E379D
DROP INDEX LS._WA_SYS_00000023_385E379D
DROP INDEX LS._WA_SYS_00000020_385E379D
DROP INDEX LS._WA_SYS_00000018_385E379D
DROP INDEX LS._WA_SYS_00000017_385E379D
DROP INDEX LS._WA_SYS_00000015_385E379D
DROP INDEX LS._WA_SYS_00000010_385E379D
DROP INDEX LS._WA_SYS_0000000F_385E379D
DROP INDEX LS._WA_SYS_00000025_385E379D
DROP INDEX LS._WA_SYS_00000046_385E379D
DROP INDEX LS._WA_SYS_00000048_385E379D
Drop Default Value Constraint If Exists For SQLServer
Drop Constraint If Exists For SQLServer
Change Default Value For SQLServer
This operation is postponed:
ALTER TABLE ls ADD CONSTRAINT DF_ls_space_use_default DEFAULT 'RETAIL' FOR space_use
Executing the postponed Schema change
Error details: Column already has a DEFAULT bound to it.
Could not create constraint. See previous errors.
Executing the postponed Schema change
Error details: Column already has a DEFAULT bound to it.
Could not create constraint. See previous errors.
Of course, now that I'm looking back, I thought maybe I should save without a default, then add a different default, but, it looks like the one case which my users wanted left blank failed when I tried to remove the default.
Drop Default Value Constraint If Exists For SQLServer
Drop Constraint If Exists For SQLServer
Change Default Value For SQLServer
This operation is postponed:
ALTER TABLE cost_tran_recur ADD CONSTRAINT DF_cost_tran_recur_date_start_default DEFAULT NULL FOR date_start
I'd appreciate any advice or pointers to the right help file, etc, thanks!