[Bast-commits] r4357 - in DBIx-Class/0.08/trunk/t: . lib/DBICTest
lib/DBICTest/Schema
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed May 7 17:37:56 BST 2008
Author: ribasushi
Date: 2008-05-07 17:37:56 +0100 (Wed, 07 May 2008)
New Revision: 4357
Added:
DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/Dummy.pm
Modified:
DBIx-Class/0.08/trunk/t/86sqlt.t
DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema.pm
DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/LongColumns.pm
Log:
Various fixes to make testing with DBICTEST_SQLT_DEPLOY=1 possible
Modified: DBIx-Class/0.08/trunk/t/86sqlt.t
===================================================================
--- DBIx-Class/0.08/trunk/t/86sqlt.t 2008-05-07 15:25:41 UTC (rev 4356)
+++ DBIx-Class/0.08/trunk/t/86sqlt.t 2008-05-07 16:37:56 UTC (rev 4357)
@@ -207,28 +207,28 @@
long_columns => [
{
'display' => 'long_columns->owner',
- 'name' => 'long_columns_fk_64_character_column_aaaaaaaaaaaaaaaaaaa_1ca973e2',
- 'index_name' => '64_character_column_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
+ 'name' => 'long_columns_fk__64_character_column_aaaaaaaaaaaaaaaaaa_cfc8d5b0',
+ 'index_name' => '_64_character_column_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'selftable' => 'long_columns', 'foreigntable' => 'long_columns',
- 'selfcols' => ['64_character_column_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'],
+ 'selfcols' => ['_64_character_column_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'],
'foreigncols' => ['lcid'],
on_delete => '', on_update => '', deferrable => 1,
},
{
'display' => 'long_columns->owner2',
- 'name' => 'long_columns_fk_32_character_column_aaaaaaaaaaaa_32_cha_6060a8f3',
- 'index_name' => '32_character_column_aaaaaaaaaaaa_32_character_column_bb_30f7a7fe',
+ 'name' => 'long_columns_fk__32_character_column_aaaaaaaaaaa__32_ch_12bdb9cf',
+ 'index_name' => '_32_character_column_aaaaaaaaaaa__32_character_column_b_6fa7ff05',
'selftable' => 'long_columns', 'foreigntable' => 'long_columns',
- 'selfcols' => ['32_character_column_bbbbbbbbbbbb', '32_character_column_aaaaaaaaaaaa'],
- 'foreigncols' => ['32_character_column_aaaaaaaaaaaa', '32_character_column_bbbbbbbbbbbb'],
+ 'selfcols' => ['_32_character_column_bbbbbbbbbbb', '_32_character_column_aaaaaaaaaaa'],
+ 'foreigncols' => ['_32_character_column_aaaaaaaaaaa', '_32_character_column_bbbbbbbbbbb'],
on_delete => '', on_update => '', deferrable => 1,
},
{
'display' => 'long_columns->owner3',
- 'name' => 'long_columns_fk_16_character_col',
- 'index_name' => '16_character_col',
+ 'name' => 'long_columns_fk__16_chars_column',
+ 'index_name' => '_16_chars_column',
'selftable' => 'long_columns', 'foreigntable' => 'long_columns',
- 'selfcols' => ['16_character_col'], 'foreigncols' => ['8_char_c'],
+ 'selfcols' => ['_16_chars_column'], 'foreigncols' => ['_8_chr_c'],
on_delete => '', on_update => '', deferrable => 1,
},
],
@@ -256,23 +256,23 @@
long_columns => [
{
'display' => 'long but not quite truncated unique',
- 'name' => 'long_columns_16_character_col_32_character_column_aaaaaaaaaaaa',
- 'table' => 'long_columns', 'cols' => [qw( 32_character_column_aaaaaaaaaaaa 16_character_col )],
+ 'name' => 'long_columns__16_chars_column__32_character_column_aaaaaaaaaaa',
+ 'table' => 'long_columns', 'cols' => [qw( _32_character_column_aaaaaaaaaaa _16_chars_column )],
},
{
'display' => 'multi column truncated unique',
- 'name' => 'long_columns_8_char_c_16_character_col_32_character_col_ee4a438c',
- 'table' => 'long_columns', 'cols' => [qw( 32_character_column_aaaaaaaaaaaa 16_character_col 8_char_c )],
+ 'name' => 'long_columns__8_chr_c__16_chars_column__32_character_co_004ce318',
+ 'table' => 'long_columns', 'cols' => [qw( _32_character_column_aaaaaaaaaaa _16_chars_column _8_chr_c )],
},
{
'display' => 'different multi column truncated unique with same base',
- 'name' => 'long_columns_8_char_c_16_character_col_32_character_col_c5dbc7a7',
- 'table' => 'long_columns', 'cols' => [qw( 32_character_column_bbbbbbbbbbbb 16_character_col 8_char_c )],
+ 'name' => 'long_columns__8_chr_c__16_chars_column__32_character_co_25773323',
+ 'table' => 'long_columns', 'cols' => [qw( _32_character_column_bbbbbbbbbbb _16_chars_column _8_chr_c )],
},
{
'display' => 'single column truncated unique',
- 'name' => 'long_columns_64_character_column_aaaaaaaaaaaaaaaaaaaaaa_095dc664',
- 'table' => 'long_columns', 'cols' => ['64_character_column_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'],
+ 'name' => 'long_columns__64_character_column_aaaaaaaaaaaaaaaaaaaaa_0acf5172',
+ 'table' => 'long_columns', 'cols' => ['_64_character_column_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'],
},
],
@@ -306,8 +306,8 @@
my $tschema = $translator->schema();
# Test that the $schema->sqlt_deploy_hook was called okay and that it removed
-# the 'link' table
-ok( !defined($tschema->get_table('link')), "Link table was removed by hook");
+# the 'dummy' table
+ok( !defined($tschema->get_table('dummy')), "Dummy table was removed by hook");
# Test that nonexistent constraints are not found
my $constraint = get_constraint('FOREIGN KEY', 'cd', ['title'], 'cd', ['year']);
Added: DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/Dummy.pm
===================================================================
--- DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/Dummy.pm (rev 0)
+++ DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/Dummy.pm 2008-05-07 16:37:56 UTC (rev 4357)
@@ -0,0 +1,23 @@
+package # hide from PAUSE
+ DBICTest::Schema::Dummy;
+
+use base 'DBIx::Class::Core';
+
+use strict;
+use warnings;
+
+__PACKAGE__->table('dummy');
+__PACKAGE__->add_columns(
+ 'id' => {
+ data_type => 'integer',
+ is_auto_increment => 1
+ },
+ 'gittery' => {
+ data_type => 'varchar',
+ size => 100,
+ is_nullable => 1,
+ },
+);
+__PACKAGE__->set_primary_key('id');
+
+1;
Modified: DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/LongColumns.pm
===================================================================
--- DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/LongColumns.pm 2008-05-07 15:25:41 UTC (rev 4356)
+++ DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/LongColumns.pm 2008-05-07 16:37:56 UTC (rev 4357)
@@ -1,4 +1,4 @@
-package # hide from PAUSE
+package # hide from PAUSE
DBICTest::Schema::LongColumns;
use base qw/DBIx::Class::Core/;
@@ -9,38 +9,38 @@
data_type => 'int',
is_auto_increment => 1,
},
- '64_character_column_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' => {
+ '_64_character_column_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' => {
data_type => 'int',
},
- '32_character_column_aaaaaaaaaaaa' => {
+ '_32_character_column_aaaaaaaaaaa' => {
data_type => 'int',
},
- '32_character_column_bbbbbbbbbbbb' => {
+ '_32_character_column_bbbbbbbbbbb' => {
data_type => 'int',
},
- '16_character_col' => {
+ '_16_chars_column' => {
data_type => 'int',
},
- '8_char_c' => {
+ '_8_chr_c' => {
data_type => 'int',
},
);
__PACKAGE__->set_primary_key('lcid');
-__PACKAGE__->add_unique_constraint([qw( 16_character_col 32_character_column_aaaaaaaaaaaa )]);
+__PACKAGE__->add_unique_constraint([qw( _16_chars_column _32_character_column_aaaaaaaaaaa )]);
-__PACKAGE__->add_unique_constraint([qw( 8_char_c 16_character_col 32_character_column_aaaaaaaaaaaa )]);
+__PACKAGE__->add_unique_constraint([qw( _8_chr_c _16_chars_column _32_character_column_aaaaaaaaaaa )]);
-__PACKAGE__->add_unique_constraint([qw( 8_char_c 16_character_col 32_character_column_bbbbbbbbbbbb )]);
+__PACKAGE__->add_unique_constraint([qw( _8_chr_c _16_chars_column _32_character_column_bbbbbbbbbbb )]);
-__PACKAGE__->add_unique_constraint([qw( 64_character_column_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa )]);
+__PACKAGE__->add_unique_constraint([qw( _64_character_column_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa )]);
__PACKAGE__->belongs_to(
'owner',
'DBICTest::Schema::LongColumns',
{
- 'foreign.lcid' => 'self.64_character_column_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
+ 'foreign.lcid' => 'self._64_character_column_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
},
);
@@ -48,8 +48,8 @@
'owner2',
'DBICTest::Schema::LongColumns',
{
- 'foreign.32_character_column_aaaaaaaaaaaa' => 'self.32_character_column_bbbbbbbbbbbb',
- 'foreign.32_character_column_bbbbbbbbbbbb' => 'self.32_character_column_aaaaaaaaaaaa',
+ 'foreign._32_character_column_aaaaaaaaaaa' => 'self._32_character_column_bbbbbbbbbbb',
+ 'foreign._32_character_column_bbbbbbbbbbb' => 'self._32_character_column_aaaaaaaaaaa',
},
);
@@ -57,7 +57,7 @@
'owner3',
'DBICTest::Schema::LongColumns',
{
- 'foreign.8_char_c' => 'self.16_character_col',
+ 'foreign._8_chr_c' => 'self._16_chars_column',
},
);
Modified: DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema.pm
===================================================================
--- DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema.pm 2008-05-07 15:25:41 UTC (rev 4356)
+++ DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema.pm 2008-05-07 16:37:56 UTC (rev 4357)
@@ -45,7 +45,7 @@
sub sqlt_deploy_hook {
my ($self, $sqlt_schema) = @_;
- $sqlt_schema->drop_table('link');
+ $sqlt_schema->drop_table('dummy');
}
1;
More information about the Bast-commits
mailing list