Looks like this is a bug, so I've filed a ticket for it:
http://datamapper.lighthouseapp.com/projects/20609-datamapper/tickets/1079-auto_upgrade-doesnt-apply-indexes
Cheers,
Drew
On 4 Oct 2009, at 20:17, Andrew Neil wrote:
>
> I am trying to apply indexes to a few of my models. I've summarized
> the relevant bits from my models in this pastie (and below):
>
> http://pastie.org/641532
>
> If I run `DataMapper.auto_migrate!` it creates the entire schema
> including the indexes, so I think I've got the syntax right in my
> models. However, if I run `DataMapper.auto_upgrade!` on my existing
> database, the schema is not updated to include the indexes. I'm using
> a sqlite3 database. Am I doing something wrong?
>
> Thanks in advance.
> Drew
>
> =============================
>
> The relevant bits of my models (see also http://pastie.org/641532):
>
> class Status
> include DataMapper::Resource
>
> property :id, Serial
> property :twitter_id, Integer, :index => true
> property :text, String, :length => 0..255
> property :created_at, DateTime, :index => true
> ...
>
> end
>
> class Noun
> include DataMapper::Resource
>
> property :id, Serial
> property :plural, String, :length => 0..255, :index =>
> true
> ...
>
> end
>
> class Collector
> include DataMapper::Resource
>
> property :id, Serial
> property :name, String, :length => 0..255, :index
> => :collector
> property :noun_id, Integer, :index
> => :collector
> ...
>
> end
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---