SimpleRepository auto migrations with indexes

Posted by scott on Stack Overflow See other posts from Stack Overflow or by scott
Published on 2010-05-30T23:36:53Z Indexed on 2010/05/30 23:42 UTC
Read the original article Hit count: 317

I am using subsonic simplerepo with migrations in dev and it makes things pretty easy but I keep running into issues with my nvarchar columns that have an index. My users table has an index defined on the username column for obvious reasons but each time I start the project subsonic is doing this:

ALTER TABLE [Users] ALTER COLUMN Username nvarchar(50);

which causes this:

The index 'IX_Username' is dependent on column 'Username'.ALTER TABLE ALTER COLUMN Username failed because one or more objects access this column

Is there any way around this issue?

© Stack Overflow or respective owner

Related posts about subsonic

Related posts about subsonic3