use strict;
use warnings;
-our $VERSION = '0.900001_04';
+our $VERSION = '0.900001_06';
$VERSION = eval $VERSION; # no errors in dev versions
## On create/insert, add new entry to AuditLog and new content to AuditHistory
sub delete {
my $self = shift;
- $self->next::method(@_);
+ my $ret = $self->next::method(@_);
$self->journal_log_delete(@_);
+ return $ret
}
sub journal_log_delete {
sub update {
my $self = shift;
- $self->next::method(@_);
+ my $ret = $self->next::method(@_);
$self->journal_log_update(@_);
+ return $ret
}
sub journal_log_update {
__PACKAGE__->load_components(qw/Schema::Journal/);
-And then call C<< $schema->bootstrap_journal >> to create all the tables
-necessary for the journal, in your database.
+And then call C<< $schema->bootstrap_journal >> (I<once only>) to create all
+the tables necessary for the journal, in your database.
Optionally set where the journal is stored:
# optional - defaults to all sources
My::Schema->journal_sources([qw/ table1 table2 /]);
-
+
$schema = My::Schema->connect(...);
$schema->journal_schema_deploy;
create your journal tables and if necessary populate them with a snapshot of
your current original schema data.
+Do not run this method more than once on your database, as redeploying the
+journal schema is not supported.
+
=item journal_schema_deploy
Will use L<DBIx::Class::Schema/deploy> to set up the tables for journalling in
well as creating the journal you will need to populate it with a history so
that when rows are deleted they can be mapped back to a (fake) creation.
-=item journal_deploy_on_connect $bool
-
-If set to a true value will cause C<journal_schema_deploy> to be called on
-C<connect>.
-
-Not recommended, but present for backwards compatibility.
+Do not run this method more than once on your database, as redeploying the
+journal schema is not supported.
=item prepopulate_journal
=back
+=head2 Deprecated Methods
+
+=over 4
+
+=item journal_deploy_on_connect $bool
+
+If set to a true value will cause C<journal_schema_deploy> to be called on
+C<connect>. Not recommended (because re-deploy of a schema is not supported),
+but present for backwards compatibility.
+
+=back
+
+=head1 TROUBLESHOOTING
+
+For PostgreSQL databases you must enable quoting on SQL command generation by
+passing C<< { quote_char => q{`}, name_sep => q{.} } >> when connecting to the
+database.
+
=head1 SEE ALSO
=over 4