Yii Framework Forum: DbSchema columns indexes - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

DbSchema columns indexes Rate Topic: -----

#1 User is offline   robak 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 25-November 08

Posted 23 December 2008 - 07:22 AM

It would be nice if CDbColumnSchema had properties such a isUnique and isIndex.
Now we can check only if column isPrimaryKey or isForeignKey.
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,892
  • Joined: 04-October 08
  • Location:DC, USA

Posted 23 December 2008 - 07:26 AM

What would you use these properties for?
0

#3 User is offline   robak 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 25-November 08

Posted 23 December 2008 - 11:21 AM

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.
0

#4 User is offline   robak 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 25-November 08

Posted 24 December 2008 - 07:09 AM

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.

0

#5 User is offline   DamirDiz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 29-November 12

Posted 29 November 2012 - 06:51 AM

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?
0

#6 User is offline   Imre 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 29
  • Joined: 30-March 11

Posted 29 November 2012 - 10:16 AM

I'd rather have this in some extension for specialised cases like yours and not bloat core code for common use cases.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users