On Aug 12, 2008, at 01:58, Bill McGonigle wrote:

hmmm:

>> Article.count(:all)
=> 0

OK, I think I figured out why this result is true. Restoring from .yaml files sets the 'type' field of the Contents table to NULL, even when the .yaml file contains Article as the type.

e.g.:

- allow_pings: t
  updated_at: 2008-02-22 15:30:54.125274
  guid: d81ed114-dc11-423b-93da-0c71c771b4c7
  body: |-
These guys are installing metal pillars so a vehicle can't get into an area to park there.

<img src="http://mcgonigle.us/bill/blog/files/ 000801c846a0_d5e95710_6501a8c0.jpeg" height="75%" width="75%">

    Thanks, Dad.
  title: Think Through the Project First
  published: t
  author: bill_mcgonigle
  type: Article
  text_filter_id: "2"
  excerpt:
  id: "22"
  blog_id: "1"
  whiteboard:
  extended: ""
  published_at: 2008-02-22 15:25:00
  user_id: "1"
  state: published
  allow_comments: t
  created_at: 2008-02-22 15:27:26.652014
  keywords: ""

results in:

LOG: statement: INSERT INTO "contents" ("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "") VALUES (E'think-through-the-project-first', NULL, 't', '2008-08-21 00:26:06.357497', E'Think Through the Project First', E'These guys are installing metal pillars so a vehicle can''t get into an area to park there.

<img src="http://mcgonigle.us/bill/blog/files/ 000801c846a0_d5e95710_6501a8c0.jpeg" height="75%" width="75%">

Thanks, Dad.', E'd81ed114-dc11-423b-93da-0c71c771b4c7', 't', NULL, E'bill_mcgonigle', NULL, 2, 22, 1, E'', NULL, 1, '2008-02-22 15:25:00.000000', E'', '2008-02-22 15:27:26.652014', 't', E'published')


I tried restoring on postgresql and mysql, same result.

I lined up all the fields and only 'type' in this table has this discrepancy.

So, I was able to get things running again with:

  UPDATE Contents SET type='Article';

And so far that looks good.

-Bill

-----
Bill McGonigle, Owner           Work: 603.448.4440
BFC Computing, LLC              Home: 603.448.1668
[EMAIL PROTECTED]               Cell: 603.252.2606
http://www.bfccomputing.com/    Page: 603.442.1833
Blog: http://blog.bfccomputing.com/
VCard: http://bfccomputing.com/vcard/bill.vcf

_______________________________________________
Typo-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/typo-list

Reply via email to