[Radiant] db:migrate brought upon reordering nightmare --
<r:children:each by="date'> exist?
Andrew Klein
bladedthoth at bladedthoth.com
Tue Apr 17 21:55:08 CDT 2007
Hello Oliver!
No luck with that. I looked through the database, and the IDs look like
they're right, as well as the created_at/published_at combo; I ran the
SQL just to try, to no avail. Where I do see an issue is in the
updated_at field (And looks like it might be the culprit) -- It seems
that the migrate or the SQL server seemed to put datestamps that are
odd. Here's a list of a few in direct sequential order in the news
section to show you what I mean:
id/created_at/updated_at
15/2007-01-29 15:39:26/2007-04-18 02:09:09
16/2007-01-30 13:49:28/2007-04-18 02:09:09
17/2007-01-31 13:55:49/2007-04-18 02:09:07
18 (Deleted)
19/2007-02-02 13:49:39/2007-04-18 02:09:09
20/2007-02-03 16:07:37/2007-04-18 02:09:08
Would it make more sense then to try
UPDATE pages SET updated_at = created_at WHERE updated_at IS NOT NULL;
Thanks for your time Oliver!
Andy
Oliver Baltzer wrote:
> Andrew Klein wrote:
>
>> I've just finished porting my website to 0.6.0rc2 after running with
>> 0.5.2 live and 0.6.0 on a test-and-build server. However, after got it
>> ported and did the db:migrate, I fell into an evil issue: For some
>> bizarre reason, db:migrate this time somehow decided it wanted to
>> re-sort all of the news articles I already had in place. Now, my article
>> order is totally random (About 90 of them) and I can't figure out why on
>> Earth it did it this time, when I didn't have this issue the last two
>> times I migrated the database to 0.6.0rc2 to make sure my migration went
>> smoothly. Anyone have any ideas?
>>
>
> I suspect something went wrong in migration
> 010_merge_behaviors_and_pages.rb where a method in the Page model is
> called to update the published_at field during #save, though it
> shouldn't have changed anything. If you have access to the database
> via a command line interface you can try to execute the following
> update (make a backup first):
>
> UPDATE pages SET published_at = created_at WHERE published_at IS NOT NULL;
>
> Maybe that helps.
>
> Cheers,
> Oliver
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Radiant mailing list
> Post: Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
More information about the Radiant
mailing list