projects
/
dbsrgits/SQL-Translator-2.0-ish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
f49a2a4
)
move reference_* down to Constraint
Justin Hunter [Sat, 22 Aug 2009 21:36:34 +0000 (14:36 -0700)]
lib/SQL/Translator/Object/Constraint.pm
patch
|
blob
|
blame
|
history
lib/SQL/Translator/Object/ForeignKey.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/SQL/Translator/Object/Constraint.pm
b/lib/SQL/Translator/Object/Constraint.pm
index
f5e5c21
..
759b97f
100644
(file)
--- a/
lib/SQL/Translator/Object/Constraint.pm
+++ b/
lib/SQL/Translator/Object/Constraint.pm
@@
-49,6
+49,17
@@
class SQL::Translator::Object::Constraint {
isa => Str,
);
+ has 'reference_table' => (
+ isa => Maybe[Str],
+ is => 'rw',
+ );
+
+ has 'reference_columns' => (
+ isa => ArrayRef | Undef,
+ is => 'rw',
+ auto_deref => 1
+ );
+
has 'options' => (
is => 'rw',
isa => ArrayRef,
diff --git
a/lib/SQL/Translator/Object/ForeignKey.pm
b/lib/SQL/Translator/Object/ForeignKey.pm
index
af1bd13
..
f9d2327
100644
(file)
--- a/
lib/SQL/Translator/Object/ForeignKey.pm
+++ b/
lib/SQL/Translator/Object/ForeignKey.pm
@@
-7,12
+7,6
@@
class SQL::Translator::Object::ForeignKey {
default => 'FOREIGN KEY',
);
- has 'reference_columns' => (
- isa => ArrayRef | Undef,
- is => 'rw',
- auto_deref => 1
- );
-
has 'on_delete' => (
isa => Maybe[Str],
is => 'rw',
@@
-27,6
+21,4
@@
class SQL::Translator::Object::ForeignKey {
isa => Str,
is => 'rw',
);
-
- method reference_fields { return $self->reference_columns }
}