James Byrne wrote:
>
> The OS is CentOS-4.4 with ruby 1.8.4 (2005-12-24) [i386-linux] and rails
> (1.1.6.5848) (1.2RC1) and postgres-pr (0.4.0)
I have another problem with data migrations. I have added two fields to
the subject table that are called "changed_on" and
"created-on"
repectively. These are supposed to default to the current time according
to my understanding of the Rails conventions and therefore I have not
named them in the data migration. However, when I run rake db:migrate I
get this:
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== CreateEntities: migrating
=================================================-- create_table(:entities)
rake aborted!
RuntimeError: ERROR C0A000 Mdate/time value "current" is no
longer
supported Fdatetime.c L1369 RDecodeDateTime: CREATE TABLE
entities ("id" serial primary key, "entity_ident" bigint NOT
NULL,
"entity_name" character varying(40) NOT NULL,
"entity_legal_style"
character varying(255) NOT NULL, "entity_type" character varying(4)
NOT
NULL, "effective_from" timestamp NOT NULL,
"superceded_after" timestamp,
"created_by" character varying(255) NOT NULL, "created_on"
timestamp
DEFAULT ''CURRENT_TIMESTAMP'', "changed_by" character
varying(255) NOT
NULL, "changed_on" timestamp DEFAULT
''CURRENT_TIMESTAMP'')
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/connection_adapters/abstract_adapter.rb:128:in
`log''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/connection_adapters/postgresql_adapter.rb:152:in
`execute''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/connection_adapters/abstract/schema_statements.rb:104:in
`create_table''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/migration.rb:275:in
`method_missing''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/migration.rb:259:in
`say_with_time''
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/migration.rb:259:in
`say_with_time''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/migration.rb:273:in
`method_missing''
./db/migrate//001_create_entities.rb:3:in `real_up''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/migration.rb:212:in
`migrate''
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/migration.rb:212:in
`migrate''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/migration.rb:335:in
`migrate''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/migration.rb:330:in
`migrate''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/migration.rb:297:in
`up''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5848/lib/active_record/migration.rb:288:in
`migrate''
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6.5848/lib/tasks/databases.rake:4
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute''
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute''
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke''
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize''
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke''
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run''
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run''
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
/usr/bin/rake:18
Does this mean that the adapter I am using is broken or is something
else amiss?
Regards,
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---