Skip Menu |

This queue is for tickets about the DBIx-Class-Schema-Loader CPAN distribution.

Report information
The Basics
Id: 84706
Status: resolved
Worked: 10 min
Priority: 0/
Queue: DBIx-Class-Schema-Loader

People
Owner: Nobody in particular
Requestors: DROLSKY [...] cpan.org
kostalaerrietta [...] gmail.com
nine [...] detonation.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Typo in git commit f839d33b5268c9396dc7cbc6432143d2f4eb5ea1
Attached patch fixes a trailing comma causing invalid SQL on schema deploy.
Subject: typo_fix.diff
diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm b/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm index 38e7123..cd4ad92 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm @@ -43,7 +43,7 @@ sub _system_schemas { my %pg_rules = ( a => 'NO ACTION', r => 'RESTRICT', - c => 'CASCADE,', + c => 'CASCADE', n => 'SET NULL', d => 'SET DEFAULT', );
Subject: Strange output for on_delete/on_update
After upgrading to the latest DBICSL and regenerating our schema classes from a Pg database, we are seeing this: { is_deferrable => 0, on_delete => "CASCADE,", on_update => "CASCADE," } Note the comma in "CASCADE," This was with version 0.7035. Previously, we'd dumped the schema with 0.7033 and hadn't seen this.
On Thu Apr 18 03:59:51 2013, ilmari wrote: Show quoted text
> Fixed in git, commit 2e86a3e: > > http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits/DBIx-Class- > Schema-Loader.git;a=commitdiff;h=2e86a3
I can confirm that this fixes it. Thanks! Olaf
Subject: extra , in DBIx::Class::Schema::Loader::DBI::Pg
DBIx::Class::Schema::Loader::DBI::Pg seems to have an extra ",", which makes it generate code like 'on_delete => "CASCADE,"', which causes SQL syntax errors if we attempt to create our database from these schema files.
Subject: patch.diff
--- /home/errietta/Pg.old 2013-07-08 11:01:24.870529044 +0100 +++ lib/DBIx/Class/Schema/Loader/DBI/Pg.pm 2013-07-08 10:27:20.319891727 +0100 @@ -43,7 +43,7 @@ my %pg_rules = ( a => 'NO ACTION', r => 'RESTRICT', - c => 'CASCADE,', + c => 'CASCADE', n => 'SET NULL', d => 'SET DEFAULT', );
This has been fixed in 0.07036, released just now.