From: Justin Hunter Date: Fri, 3 Jul 2009 21:54:53 +0000 (-0700) Subject: add ability to store sequences X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d78b115148f3e6782372cf39bcb9c463af349988;p=dbsrgits%2FSQL-Translator-2.0-ish.git add ability to store sequences --- diff --git a/lib/SQL/Translator/Object/Sequence.pm b/lib/SQL/Translator/Object/Sequence.pm new file mode 100644 index 0000000..436319b --- /dev/null +++ b/lib/SQL/Translator/Object/Sequence.pm @@ -0,0 +1,12 @@ +package SQL::Translator::Object::Sequence; +use namespace::autoclean; +use Moose; +use MooseX::Types::Moose qw(Str); +use SQL::Translator::Types qw(); +extends 'SQL::Translator::Object'; + +has 'name' => (is => 'ro', isa => Str, required => 1); + +__PACKAGE__->meta->make_immutable; + +1; diff --git a/lib/SQL/Translator/Types.pm b/lib/SQL/Translator/Types.pm index 765b0fc..1693303 100644 --- a/lib/SQL/Translator/Types.pm +++ b/lib/SQL/Translator/Types.pm @@ -1,12 +1,13 @@ package SQL::Translator::Types; use MooseX::Types::Moose qw(ArrayRef CodeRef Str); -use MooseX::Types -declare, [qw(Column Constraint Index Procedure Schema Table Trigger View DBIHandle)]; +use MooseX::Types -declare, [qw(Column Constraint Index Procedure Schema Sequence Table Trigger View DBIHandle)]; class_type Column, { class => 'SQL::Translator::Object::Column' }; class_type Constraint, { class => 'SQL::Translator::Object::Constraint' }; class_type Index, { class => 'SQL::Translator::Object::Index' }; class_type Procedure, { class => 'SQL::Translator::Object::Procedure' }; class_type Schema, { class => 'SQL::Translator::Object::Schema' }; +class_type Sequence, { class=> 'SQL::Translator::Object::Sequence' }; class_type Table, { class => 'SQL::Translator::Object::Table' }; class_type Trigger, { class => 'SQL::Translator::Object::Trigger' }; class_type View, { class => 'SQL::Translator::Object::View' };