CC: | Mark Grimes <mgrimes [...] cpan.org> |
Subject: | [PATCH] Demonstrates uppercase column name bug by adding BARCODE to CD |
Date: | Fri, 3 May 2013 09:12:47 -0400 |
To: | bug-DBIx-Class-Fixtures [...] rt.cpan.org |
From: | Mark Grimes <mgrimes [...] cpan.org> |
The fixtures appear to be dumped correctly, but populate() failes
when attempting to deploy the test database:
DBIx::Class::Fixtures::populate(): No such column 'BARCODE' on
source Cd at t/12-populate-basic.t line 31
---
t/lib/DBICTest.pm | 14 +++++++-------
t/lib/DBICTest/Schema/CD.pm | 4 ++++
t/lib/DBICTest/Schema2/CD.pm | 4 ++++
t/lib/mysql.sql | 3 ++-
t/lib/sqlite.sql | 3 ++-
t/lib/sqlite_different.sql | 3 ++-
6 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/t/lib/DBICTest.pm b/t/lib/DBICTest.pm
index 988e02b..c7f0ebf 100755
--- a/t/lib/DBICTest.pm
+++ b/t/lib/DBICTest.pm
@@ -154,13 +154,13 @@ sub populate_schema {
]);
$schema->populate('CD', [
- [ qw/cdid artist title year/ ],
- [ 1, 1, "Spoonful of bees", 1999 ],
- [ 2, 1, "Forkful of bees", 2001 ],
- [ 3, 1, "Caterwaulin' Blues", 1997 ],
- [ 4, 2, "Generic Manufactured Singles", 2001 ],
- [ 5, 2, "We like girls and stuff", 2003 ],
- [ 6, 3, "Come Be Depressed With Us", 1998 ],
+ [ qw/cdid artist title year BARCODE/ ],
+ [ 1, 1, "Spoonful of bees", 1999, 100 ],
+ [ 2, 1, "Forkful of bees", 2001, 200 ],
+ [ 3, 1, "Caterwaulin' Blues", 1997, 300 ],
+ [ 4, 2, "Generic Manufactured Singles", 2001, 400 ],
+ [ 5, 2, "We like girls and stuff", 2003, 500 ],
+ [ 6, 3, "Come Be Depressed With Us", 1998, 600 ],
]);
$schema->populate('Tag', [
diff --git a/t/lib/DBICTest/Schema/CD.pm b/t/lib/DBICTest/Schema/CD.pm
index a6f084f..f29d39f 100644
--- a/t/lib/DBICTest/Schema/CD.pm
+++ b/t/lib/DBICTest/Schema/CD.pm
@@ -20,6 +20,10 @@ __PACKAGE__->add_columns(
data_type => 'varchar',
size => 100,
},
+ 'BARCODE' => {
+ data_type => 'varchar',
+ size => 100,
+ },
);
__PACKAGE__->set_primary_key('cdid');
__PACKAGE__->add_unique_constraint([ qw/artist title/ ]);
diff --git a/t/lib/DBICTest/Schema2/CD.pm b/t/lib/DBICTest/Schema2/CD.pm
index 7d11ebc..1e8fc36 100644
--- a/t/lib/DBICTest/Schema2/CD.pm
+++ b/t/lib/DBICTest/Schema2/CD.pm
@@ -20,6 +20,10 @@ __PACKAGE__->add_columns(
data_type => 'varchar',
size => 100,
},
+ 'BARCODE' => {
+ data_type => 'varchar',
+ size => 100,
+ },
);
__PACKAGE__->set_primary_key('cdid');
__PACKAGE__->add_unique_constraint([ qw/artist title/ ]);
diff --git a/t/lib/mysql.sql b/t/lib/mysql.sql
index ca1b034..e8cb405 100644
--- a/t/lib/mysql.sql
+++ b/t/lib/mysql.sql
@@ -26,7 +26,8 @@ CREATE TABLE cd (
cdid INTEGER PRIMARY KEY NOT NULL,
artist integer NOT NULL,
title varchar(100) NOT NULL,
- year varchar(100) NOT NULL
+ year varchar(100) NOT NULL,
+ BARCODE varchar(100) NOT NULL
);
--
diff --git a/t/lib/sqlite.sql b/t/lib/sqlite.sql
index 1e21627..277d297 100644
--- a/t/lib/sqlite.sql
+++ b/t/lib/sqlite.sql
@@ -29,7 +29,8 @@ CREATE TABLE cd (
cdid INTEGER PRIMARY KEY NOT NULL,
artist integer NOT NULL,
title varchar(100) NOT NULL,
- year varchar(100) NOT NULL
+ year varchar(100) NOT NULL,
+ BARCODE varchar(100) NOT NULL
);
--
diff --git a/t/lib/sqlite_different.sql b/t/lib/sqlite_different.sql
index 77b1de4..e53af3c 100644
--- a/t/lib/sqlite_different.sql
+++ b/t/lib/sqlite_different.sql
@@ -20,7 +20,8 @@ CREATE TABLE cd (
cdid INTEGER PRIMARY KEY NOT NULL,
artist integer NOT NULL,
title varchar(100) NOT NULL,
- year varchar(100) NOT NULL
+ year varchar(100) NOT NULL,
+ BARCODE varchar(100) NOT NULL
);
--
--
1.8.2.1