use warnings;
use lib qw(lib t/lib);
+use DBICTest;
use DBICTest::Schema;
use SQL::Translator;
-my $schema = DBICTest::Schema->connect;
+my $schema = DBICTest::Schema->connect(DBICTest->_database);
print scalar ($schema->storage->deployment_statements(
$schema,
'SQLite',
}
# test blobs (stolen from 73oracle.t)
- eval { $dbh->do('DROP TABLE "bindtype_test2"') };
+ eval { $dbh->do('DROP TABLE "bindtype_test"') };
$dbh->do(q[
- CREATE TABLE "bindtype_test2"
+ CREATE TABLE "bindtype_test"
(
"id" INT PRIMARY KEY,
"bytea" INT,
- "a_blob" BLOB,
- "a_clob" BLOB SUB_TYPE TEXT
+ "blob" BLOB,
+ "clob" BLOB SUB_TYPE TEXT
)
]);
my $maxloblen = length $binstr{'large'};
local $dbh->{'LongReadLen'} = $maxloblen;
- my $rs = $schema->resultset('BindType2');
+ my $rs = $schema->resultset('BindType');
my $id = 0;
- foreach my $type (qw( a_blob a_clob )) {
+ foreach my $type (qw( blob clob )) {
foreach my $size (qw( small large )) {
$id++;
diag $@ if $@;
}
- foreach my $table (qw/artist bindtype_test2 sequence_test/) {
+ foreach my $table (qw/artist bindtype_test sequence_test/) {
eval { $dbh->do(qq[DROP TABLE "$table"]) };
diag $@ if $@;
}
Artist
SequenceTest
BindType
- BindType2
Employee
CD
FileColumn
+++ /dev/null
-package # hide from PAUSE
- DBICTest::Schema::BindType2;
-
-use base qw/DBICTest::BaseResult/;
-
-__PACKAGE__->table('bindtype_test2');
-
-__PACKAGE__->add_columns(
- 'id' => {
- data_type => 'integer',
- is_auto_increment => 1,
- },
- 'bytea' => {
- data_type => 'bytea',
- is_nullable => 1,
- },
- 'a_blob' => {
- data_type => 'blob',
- is_nullable => 1,
- },
- 'a_clob' => {
- data_type => 'clob',
- is_nullable => 1,
- },
-);
-
-__PACKAGE__->set_primary_key('id');
-
-1;
--
-- Created by SQL::Translator::Producer::SQLite
--- Created on Thu Feb 11 07:23:33 2010
+-- Created on Sat Mar 6 11:57:45 2010
--
-;
--
-- Table: artist
);
--
--- Table: bindtype_test2
---
-CREATE TABLE bindtype_test2 (
- id INTEGER PRIMARY KEY NOT NULL,
- bytea blob,
- a_blob blob,
- a_clob clob
-);
-
---
-- Table: collection
--
CREATE TABLE collection (
-- View: year2000cds
--
CREATE VIEW year2000cds AS
- SELECT cdid, artist, title, year, genreid, single_track FROM cd WHERE year = "2000"
\ No newline at end of file
+ SELECT cdid, artist, title, year, genreid, single_track FROM cd WHERE year = "2000"