[Catalyst] Keep getting checksum mismatch problems each
time I regenerate my schema files
kakimoto at tpg.com.au
kakimoto at tpg.com.au
Thu Apr 23 02:37:08 GMT 2009
Hi there
I think I know why.
Because I use the TimeStamp component, I guess I should have executed
the command as per the tute
(http://search.cpan.org/~hkclark/Catalyst-Manual-5.7020/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod)
with the 'components=TimeStamp'.
command: script/myapp_create.pl model DB DBIC::Schema MyApp::Schema
create=static components=TimeStamp dbi:SQLite:myapp.db
Quoting Tomas Doran <bobtfish at bobtfish.net>:
> This discussion should be on the DBIC list really, as it doesn't have
>
> much to do with Catalyst.
>
> On 17 Apr 2009, at 03:27, kakimoto at tpg.com.au wrote:
> > Quoting John Romkey <romkey at apocalypse.org>:
> >> Look in the schema file. You see this line?
> >>
> >> # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum: XXXXXXXX
> >>
> >> it means that you modified that line or something above it...
> >
> > Yes I do see the line.
> >
> > If the way the check is to be done is so stringent (ie. permissions
> on
> > the files it touches or even new lines, surely, the makers of this
> > package could come up with somethign better. I don't have the same
>
> > issue
> > when using Ruby on Rails' Active Records).
> >
>
>
> What? There is nothing done with permissions, I have no idea what
> you're talking about with that.
>
> And I can't think of a better way to ensure that someone hasn't
> altered the generated code than what is done. Conceptually you
> _could_ in some way get the optree of the code, rather than the text,
>
> and then checksum that (so that you could add new lines and spaces
> and comments to the generated code), but this is _extremely non-
> trivial_ to implement, and also still wouldn't provide a way to leave
>
> your modifications in place when the code was re-generated, so I
> don't see any benefit to investigating it.
>
> Saying ActiveRecord doesn't do this isn't really helpful - you're not
>
> comparing like with like here.. ActiveRecord does around the same as
>
> 'create=dynamic' for schema mode, so there really _is no generated
> code_, as its introspected each time.
>
> You _can_ do your schema like this if you want to, but that opens a
>
> whole load of different issues I won't go into here (which
> ActiveRecord also suffers from).
>
> Cheers
> t0m
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>
>
More information about the Catalyst
mailing list