[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6569] trunk
- Subject: SF.net SVN: ledger-smb:[6569] trunk
- From: ..hidden..
- Date: Tue, 21 Jan 2014 05:36:41 +0000
Revision: 6569
http://sourceforge.net/p/ledger-smb/code/6569
Author: einhverfr
Date: 2014-01-21 05:36:40 +0000 (Tue, 21 Jan 2014)
Log Message:
-----------
Adding hooks for on load schema changes (for things like relaxing unique constraints, see bug 915
Modified Paths:
--------------
trunk/LedgerSMB/Database.pm
Added Paths:
-----------
trunk/sql/on_load/
Modified: trunk/LedgerSMB/Database.pm
===================================================================
--- trunk/LedgerSMB/Database.pm 2014-01-21 05:27:47 UTC (rev 6568)
+++ trunk/LedgerSMB/Database.pm 2014-01-21 05:36:40 UTC (rev 6569)
@@ -574,6 +574,15 @@
errlog => ($args->{errlog} || "${log}_stderr")
});
+ opendir(LOADDIR, 'sql/on_load');
+ while (my $fname = readdir(LOADDIR)){
+ $self->exec_script({
+ script => "$self->{source_dir}sql/on_load/$fname",
+ log => ($args->{log} || "${log}_stdout"),
+ errlog => ($args->{errlog} || "${log}_stderr")
+ }) if -f "sql/on_load/$fname";
+ }
+
my $dbh = $self->dbh;
my $sth = $dbh->prepare(
qq|select true
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits