From: Justin Hunter Date: Fri, 4 Dec 2009 19:43:12 +0000 (-0800) Subject: add drop_trigger (and put things in alphabetical order) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e8ca928cbf89fef7f54192868778deac06beca8f;p=dbsrgits%2FSQL-Translator-2.0-ish.git add drop_trigger (and put things in alphabetical order) --- diff --git a/lib/SQL/Translator/Object/Compat.pm b/lib/SQL/Translator/Object/Compat.pm index 0e7a5c7..1a7a030 100644 --- a/lib/SQL/Translator/Object/Compat.pm +++ b/lib/SQL/Translator/Object/Compat.pm @@ -1,7 +1,7 @@ use MooseX::Declare; role SQL::Translator::Object::Compat { use MooseX::Types qw(Any ArrayRef Int Str); - use SQL::Translator::Types qw(Column Constraint Index Table View); + use SQL::Translator::Types qw(Column Constraint Index Table Trigger View); use MooseX::MultiMethods; @@ -28,10 +28,11 @@ role SQL::Translator::Object::Compat { method add_field(Column $column does coerce) { $self->add_column($column) } - method drop_table(Table|Str $table, Int :$cascade = 0) { $self->remove_table($table, cascade => $cascade) } method drop_column(Column|Str $column, Int :$cascade = 0) { $self->remove_column($column, cascade => $cascade) } - method drop_index(Index|Str $index) { $self->remove_index($index) } method drop_constraint(Constraint|Str $constraint) { $self->remove_constraint($constraint) } + method drop_index(Index|Str $index) { $self->remove_index($index) } + method drop_table(Table|Str $table, Int :$cascade = 0) { $self->remove_table($table, cascade => $cascade) } + method drop_trigger(Trigger|Str $trigger) { $self->remove_trigger($trigger) } method drop_view(View|Str $view) { $self->remove_view($view) } method get_fields { $self->get_columns }