It would be nice if CDbColumnSchema had properties such a isUnique and isIndex.
Now we can check only if column isPrimaryKey or isForeignKey.
It would be nice if CDbColumnSchema had properties such a isUnique and isIndex.
Now we can check only if column isPrimaryKey or isForeignKey.
What would you use these properties for?
I'm writing apllictation which will work on some existing dbs. I have a console application which checks wheter existing tables have all columns and indexes which I need in my apllication. If not table is altered.
Most is easy to do with DbSchema but there is no information about indexes.
I was thinking about it and I think that this feature is completly not necessary.
DbSchema classes should be as simple as it is possible because writing new drivers classes should be easy. Sorry for this confusion.
i also need this functionality.
im writing a script that generates a migration file from an existing database schema. but without the index information its pretty much useless.
is there some kind of workaround?
I’d rather have this in some extension for specialised cases like yours and not bloat core code for common use cases.