add ability to store sequences
Justin Hunter [Fri, 3 Jul 2009 21:54:53 +0000 (14:54 -0700)]
lib/SQL/Translator/Object/Sequence.pm [new file with mode: 0644]
lib/SQL/Translator/Types.pm

diff --git a/lib/SQL/Translator/Object/Sequence.pm b/lib/SQL/Translator/Object/Sequence.pm
new file mode 100644 (file)
index 0000000..436319b
--- /dev/null
@@ -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;
index 765b0fc..1693303 100644 (file)
@@ -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' };