Commit Graph

14 Commits

Author SHA1 Message Date
Mateusz Uzdowski
8eb0fa91bd API Add the ability to query if the schema update is in progress.
The specific situation where this is useful is where populateDefaults on
DataObjects needs to query the database. This will break the dev/build
when it tries to create the object via singleton - the query will not be
able to be executed if the table is not there or its schema has changed.

For an example of such use case see Translatable::populateDefaults.
2012-10-17 11:45:21 +13:00
Sam Minnee
1f7fc1f76a FIX Remove instances of lines longer than 120c
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit.  This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Fred Condo
d370423825 Clean up trailing ?> per coding standard
All sapphire but the lang directory
2012-02-12 12:40:16 -08:00
Ingo Schommer
8302af1ea8 ENHANCEMENT Added Database->getLock() and Database->releaseLock() for application-level advisory locks 2011-10-07 14:12:50 +02:00
Ingo Schommer
0a4aa9dc17 BUGFIX Renamed MySQLDatabase->clear_cached_fieldlist() to clearCachedFieldList() and moved to parent Database class in order to avoid breaking other database drivers (broken in 360176d2 by gmunn) 2011-03-11 14:22:59 +13:00
Geoff Munn
360176d23c MINOR: cached fieldlist array can now be cleared
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115445 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-01-12 00:10:38 +00:00
Ingo Schommer
06ba0085dd MINOR: Added test for Database::hasTable(). (from r106119)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112519 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:57:14 +00:00
Ingo Schommer
68fb898c6d API CHANGE: Added cancelSchemaUpdate() and doesSchemaNeedUpdating() to the Database class (from r97827)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102538 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 23:43:10 +00:00
Ingo Schommer
e921b376bc API CHANGE: Don't generate TestOnly DataObjects in the database immediately; instead let test developers specify them in SapphireTest::$extraDataObjects.
API CHANGE: Added SapphireTest::resetDBSchema() (from r90054) (from r96734)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102356 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 02:03:16 +00:00
Ingo Schommer
38c71c56a3 MINOR Added flag to remaining SapphireTest subclasses
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93977 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-30 01:56:05 +00:00
Ingo Schommer
336bce8bf8 ENHANCEMENT Added DataObject::$create_table_options to pass through special options to Database->requireTable(). Contains a keyed array by database driver. Example use is specifying different storage engines for MySQL: array('MySQLDatabase'=>'ENGINE=InnoDB')
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77160 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 03:55:14 +00:00
Ingo Schommer
117806756c ENHANCEMENT Added Database->renameField() and Database->dontRequireField()
ENHANCEMENT Added DatabaseTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65494 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-09 23:56:24 +00:00