package SQL::Translator::Object::Constraint;
use Moose;
+use SQL::Translator::Types;
has 'name' => (is => 'ro', isa => 'Str', required => 1);
-has 'columns' => (is => 'ro', isa => 'ArrayRef[SQL::Translator::Object::Column]', required => 1);
+has 'columns' => (is => 'ro', isa => 'ArrayRef[Column]', required => 1);
has 'type' => (is => 'ro', isa => 'Str', required => 1);
1;
package SQL::Translator::Object::Index;
use Moose;
+use SQL::Translator::Types;
has 'name' => (is => 'ro', isa => 'Str', required => 1);
-has 'columns' => (is => 'ro', isa => 'ArrayRef[SQL::Translator::Object::Column]', required => 1);
+has 'columns' => (is => 'ro', isa => 'ArrayRef[Column]', required => 1);
has 'type' => (is => 'ro', isa => 'Str', required => 1);
1;
package SQL::Translator::Object::Procedure;
use Moose;
+has 'name' => (is => 'ro', isa => 'Str', required => 1);
+has 'contents' => (is => 'ro', isa => 'Str', required => 1);
+
1;
package SQL::Translator::Object::Schema;
use Moose;
+use SQL::Translator::Types;
-has 'tables' => (is => 'ro', isa => 'ArrayRef[SQL::Translator::Object::Table]', required => 1);
-has 'views' => (is => 'ro', isa => 'ArrayRef[SQL::Translator::Object::View]', required => 0);
-has 'procedures' => (is => 'ro', isa => 'ArrayRef[SQL::Translator::Object::Procedure]', required => 0);
+has 'tables' => (is => 'ro', isa => 'ArrayRef[Table]', required => 1);
+has 'views' => (is => 'ro', isa => 'ArrayRef[View]', required => 0);
+has 'procedures' => (is => 'ro', isa => 'ArrayRef[Procedure]', required => 0);
1;
package SQL::Translator::Object::Table;
use Moose;
+use SQL::Translator::Types;
has 'name' => (is => 'ro', isa => 'Str', required => 1);
-has 'columns' => (is => 'ro', isa => 'ArrayRef[SQL::Translator::Object::Column]', required => 1);
-has 'indexes' => (is => 'ro', isa => 'ArrayRef[SQL::Translator::Object::Index]', required => 0);
-has 'constraints' => (is => 'ro', isa => 'ArrayRef[SQL::Translator::Object::Constraint]', required => 0);
+has 'columns' => (is => 'ro', isa => 'ArrayRef[Column]', required => 1);
+has 'indexes' => (is => 'ro', isa => 'ArrayRef[Index]', required => 0);
+has 'constraints' => (is => 'ro', isa => 'ArrayRef[Constraint]', required => 0);
1;