CC: | TMUELLER [...] cpan.org |
Subject: | no numbers in sequence |
I've tried to create a table with a number in a table name into a postgres database.
my $tableName = 'table_name_02';
my $primary_key = $creator->generate_primary_key_sql($tableName);
$creator->create_table("
create table $tableName
(
id $primary_key
)
");
During creation the sequence for the primary key, the number is cutted.
Later if the sequence is needed, there is an exception because the sequence has no number.
$VAR1 = {
'columns' => [
{
'id' => {
'notnull' => '1',
'type' => 'VARCHAR(255)',
'primarykey' => '1'
}
},
{
'active' => {
'type' => 'BIT(1)'
}
}
],
'name' => 'table_name_02'
};
DBIx::Admin::CreateTable. SQL: create sequence table_name__id_seq.
DBIx::Admin::CreateTable. Created sequence 'table_name__id_seq'.
DBD::Pg::db do failed: ERROR: Relation "table_name_02_id_seq" does not exist at /usr/local/share/perl/5.14.2/DBIx/Admin/CreateTable.pm line 101, <$rfh> line 1.
DBIx::Admin::CreateTable. SQL:
create table table_name_02
(
id integer primary key default nextval('table_name_02_id_seq')
)
.