DBIx-Class-StateMigrations
view release on metacpan or search on metacpan
lib/DBIx/Class/StateMigrations.pm view on Meta::CPAN
my $self = shift;
my $callback = shift;
my $Migration = $self->matched_Migration or die join('',
'execute_matched_Migration(): no migration matched'
);
$Migration->execute_routines( $self->connected_schema, $callback )
}
has '__loaded_vagrant_classes', is => 'ro', isa => HashRef, default => sub {{}};
has 'migrations_dir', is => 'ro', default => sub { undef };
has 'connected_schema', is => 'ro', required => 1, isa => InstanceOf['DBIx::Class::Schema'];
has 'DBI_Driver_Name', is => 'ro', init_arg => undef, lazy => 1, default => sub {
my $self = shift;
$self->connected_schema->storage->dbh->{Driver}{Name}
}, isa => Str;
lib/DBIx/Class/StateMigrations/Migration.pm view on Meta::CPAN
sub invalid { 0 }
has 'migration_name', is => 'ro', lazy => 1, default => sub {
my $self = shift;
$self->_migration_name_from_classname
? $self->_migration_name_from_classname
: join('_', 'sm', map { $_->fingerprint } @{ $self->trigger_SchemaStates })
}, isa => Str;
has 'trigger_SchemaStates', is => 'ro', required => 1, isa => ArrayRef[
InstanceOf['DBIx::Class::StateMigrations::SchemaState']
];
has 'frozen_trigger_SchemaStates', is => 'ro', lazy => 1, default => sub {
my $self = shift;
clone( $self->trigger_SchemaStates )
}, isa => ArrayRef[InstanceOf['DBIx::Class::StateMigrations::SchemaState']];
has 'DBI_Driver_Name', is => 'ro', required => 1, isa => Str;
lib/DBIx/Class/StateMigrations/SchemaState.pm view on Meta::CPAN
default => sub { undef }
);
sub _clear_DiffState {
my $self = shift;
$self->fingerprint; # make sure we've already recorded the fingerprint
$self->_set_DiffState( undef )
}
has 'diff_filters', is => 'ro', default => sub {[]}, isa => ArrayRef;
sub filtered_DiffState {
my $self = shift;
my $State = $self->DiffState or return undef;
my @chain = @{ $self->diff_filters };
while (scalar(@chain) > 0) {
my $meth = shift @chain;
die "bad diff_filters - argument list must be even" unless (scalar(@chain) > 0);
( run in 0.672 second using v1.01-cache-2.11-cpan-5f2e87ce722 )