Bug #478

ActiveRecord::StatementInvalid in Admin/general#migrate

Added by rboone-mail-wtamu-edu - 1107 days ago. Updated 750 days ago.

Status :Closed Start :
Priority :Normal Due date :
Assigned to :scott - % Done :

0%

Category :admin
Target version :-
Resolution :

fixed


Description

  • OS: Fedora Core 4
  • ruby: 1.8.2
  • rake: 0.5.4
  • database: postgresql 8.0.3

I get the following error when trying to migrate the database:

ERROR C42804 Mcolumn "updated_at" is of type timestamp without time zone but expression is of type text HYou will need to rewrite or cast the expression. Fparse_target.c L367 RupdateTargetListEntry: insert into contents (select * from articles)

/db/migrate//20_superclass_articles.rb:31:in @up'

/db/migrate//20_superclass_articles.rb:6:in @transaction'

/db/migrate//20_superclass_articles.rb:6:in @up'

/lib/migrator.rb:26:in @migrate'

app/controllers/admin/general_controller.rb:17:in @migrate'

./script/server:49

Associated revisions

Revision 707
Added by scott 1074 days ago

Add tag/category lists. Closes #478

History

10/02/2005 10:28 PM - scott -

  • Status changed from New to Assigned

What does your articles table look like? Run psql, connect to your DB, and type '\d articles', then paste the result back here.

10/02/2005 10:32 PM - rboone-mail-wtamu-edu -

blog=# \d articles
                                         Table "public.articles" 
     Column     |            Type             |                        Modifiers                         
----------------+-----------------------------+----------------------------------------------------------
 id             | integer                     | not null default nextval('public.articles_id_seq'::text)
 title          | character varying(255)      | 
 author         | character varying(255)      | 
 body           | text                        | 
 body_html      | text                        | 
 extended       | text                        | 
 excerpt        | text                        | 
 keywords       | character varying(255)      | 
 allow_comments | integer                     | 
 allow_pings    | integer                     | 
 published      | integer                     | default 1
 created_at     | timestamp without time zone | 
 updated_at     | timestamp without time zone | 
 extended_html  | text                        | 
 guid           | character varying(255)      | 
 permalink      | character varying(255)      | 
 user_id        | integer                     | 
 text_filter_id | integer                     | 
 text_filter    | character varying(20)       | 
 whiteboard     | text                        | 
Indexes:
    "articles_pkey" PRIMARY KEY, btree (id)
    "articles_permalink_index" btree (permalink)

10/03/2005 02:36 AM - scott -

  • Status changed from Assigned to Closed
  • Resolution set to fixed

Fixed in r662.

Also available in: Atom PDF