81 Commits

Author SHA1 Message Date
Petr Skoda
365a594107 MDL-24321 switching to stdClass in /lib/ 2010-09-21 08:07:44 +00:00
Petr Skoda
844239d3ed MDL-24092 removing STATEMENTS support from install.xml, use db/install.php or db/log.php instead 2010-09-06 11:11:32 +00:00
Petr Skoda
78bfb562a0 MDL-21249 improved php docs and adding direct access prevention in core libs 2010-07-25 13:35:05 +00:00
Petr Skoda
0f6db1c3d2 fixed comment typo 2010-05-22 19:01:52 +00:00
Petr Skoda
c5d1816470 MDL-14679 fixed double encoding of html entities in debuginfo coming from the dml and ddl 2010-03-20 13:46:15 +00:00
stronk7
2baf1380d4 MDL-19695 field dependencies - defined new exception ddl_dependency_exception that
will be thrown when one DDL operation (drop only for now) is attempted over one
field being part of indexes.
2009-07-02 16:08:44 +00:00
skodak
94b6329544 MDL-14679 license header fixes 2009-06-12 08:44:49 +00:00
samhemelryk
c030b5eea2 lib MDL-19236 Corrected copyright's 2009-05-26 09:29:18 +00:00
samhemelryk
3564771d6b lib MDL-19236 added phpdocs and copyrights 2009-05-22 08:41:00 +00:00
tjhunt
1d59689fc9 ddllib.php: add required library 2009-04-08 11:46:39 +00:00
skodak
591ffe1a6a MDL-17129 dml/ddl: improved ddl exceptions when changing db structure 2008-11-05 10:45:45 +00:00
skodak
6d89eff087 MDL-16930 ddl - exceptions cleanup 2008-10-18 22:46:17 +00:00
skodak
598b38f743 MDL-15635 library inclusion refactoring 2008-08-30 18:47:22 +00:00
skodak
b1f93b1512 MDL-15246 moving all remaining ddl function to adminlib, keeping old lib/ddllib.php only for BC withexisting code; fixed inline docs related to ddl 2008-06-15 10:32:50 +00:00
skodak
e6b4f00ed7 MDL-14905 towards functional DB tests 2008-06-10 19:54:27 +00:00
stronk7
a8cb94f66f MDL-14863 - 1st iteration: lowercase XMLDB table, field, index, key and statement +
wrapper class to support old syntax (no changes in public API yet)
2008-05-20 23:24:40 +00:00
stronk7
46293bd7b7 MDL-14863 - 1st iteration: lowercase XMLDB constants, object, file and structure (no changes in public API yet) 2008-05-20 17:06:26 +00:00
skodak
f33e1ed4ae MDL-14679 ok, here is the big patch with new dmllib and ddlib API, some code is already converted, XML db editor works; see tracker for details of regressions and TODOs 2008-05-15 21:40:00 +00:00
sam_marshall
d9b063277b MDL-13660: Allow admin reports to have db tables, cron 2008-02-26 10:34:51 +00:00
skodak
8293c75198 MDL-6786 Improved dropping of block and module tables during uninstall; merged from MOODLE_19_STABLE 2008-01-03 15:03:32 +00:00
fmarier
69885093bf ddllib: Mark table_column() as deprecated
Signed-off-by: Eloy Lafuente
2007-12-03 23:20:03 +00:00
nicolasconnault
1f0e492171 Unit test refactoring using mock objects. NOT FINISHED: testgradecategory and testgradeitem are incomplete. The other tests work great however, and no longer a need for DB data 2007-11-07 17:59:33 +00:00
nicolasconnault
b7064779f5 Updated copyright notice in header 2007-10-10 05:25:14 +00:00
stronk7
f090314f46 General cleanup of debugging messages.
Now change_field_enum() introspects DB and detects
if the enum existed or no, as needed. MDL-9356
2007-09-11 18:33:23 +00:00
stronk7
af1192b159 Now both check_constraint_exists() and find_check_constraint_name()
are working under mysql, postgresql and mssql. 1st step of MDL-9356
2007-09-10 22:42:04 +00:00
stronk7
7abc6e09c0 Adding two new functions to search for check constraints from ddl stuff.
Unused and unfinished for now. I need them in CVS.
2007-09-10 22:22:23 +00:00
stronk7
b794dc20c0 Instead of looking for current default value, fetch from
the generator the *real* default value that the table will have.
2007-08-11 21:47:22 +00:00
martinlanghoff
a4b6d764dd ddllib: Introducing create_temp_table()
Close sibling to create_table() - will create a temporary table.
Two aspects of its usage are interesting

 - you _must_ truncate the table after creation as you may be
   "inheriting" an existing temp table from the former user
   of your persistent connection

 - you must use the tablename returned to support MSSQL and any
   other DB that needs special names for temp tables

A couple of TODOs

 - I just don't know how to actually munge the tablename for MSSQL
   (help! Eloooooyyyy!)

 - Surely Eloy will have something better than the preg_replace() ;-)
2007-04-29 20:31:47 +00:00
stronk7
42b9540e01 When renaming tables, check that the new one doesn't exist. 2007-01-27 20:13:23 +00:00
stronk7
bb3172c038 Prevent rename_field() to be executed if no full specs of
the original field are provided. MDL-8296
2007-01-24 17:54:53 +00:00
stronk7
c672870f8e Introducing CFG->dbfamily and create a setter function for it
(to be able to use families at install). MDL-7061
2007-01-12 23:44:00 +00:00
skodak
810944af7f we are going 100% unicode now - removed use of $CFG->unicodedb and current_charset(); MDL-7439 - part 2, only hotpot and wiki left 2006-11-11 17:23:20 +00:00
stronk7
dddf32590f Dropping xmldb_dbg($message). Now it has been replaced by a new cleaner
debug system, with XMLDB hook for debug enabled by the creation of one
function called: xmldb_debug($message, $object), currently present in
lib/datalib.php MDL-7261
2006-10-28 15:24:04 +00:00
stronk7
93f98abdb9 Improve error output of install_from_xmldb_file(). Part of MDL-7262
Merged from MOODLE_17_STABLE
2006-10-28 10:37:54 +00:00
stronk7
8914508a4b Prevent add_field() to work if we are adding one not null field
to one non-empty table without specifying its default value.

Merged from MOODLE_17_STABLE
2006-10-21 18:19:47 +00:00
toyomoyo
207355b438 merged, setting $CFG->unicodedb after converting db to unicode. Chaning the order of if clause to same some sqls 2006-10-20 02:08:21 +00:00
mjollnir_
722c3bfede error reporting for xmldb (credit: Nigel McNie <nigel@catalyst.net.nz>) 2006-10-19 23:30:28 +00:00
toyomoyo
c30f752c30 merged, adding addtional check to change_db_encoding to make sure db not already in unicode, upon successful conversion set the correct names 2006-10-19 02:14:43 +00:00
toyomoyo
a6eb09d977 merged added code to force mysql db to change default encoding during fresh installation 2006-10-18 07:26:04 +00:00
stronk7
1c460b0bc9 Show error if the dbtype specified isn't supported by XMLDB 2006-10-09 22:28:22 +00:00
stronk7
c5ac44c69e Added find_sequence_name() to be used by insert_record() to get the correct sequence 2006-10-08 09:38:09 +00:00
moodler
a9b1f143d2 Undoing my hacks to try and keep this code clean as possible. 2006-10-04 15:30:54 +00:00
moodler
eb437bd351 Some changes to ddllib.php to make some functions a bit easier to call.
May not be final ... see MDL-6817 for details.
2006-10-04 09:44:38 +00:00
stronk7
6fdea1a0bd In my previous commit, "I" was "It" :-D
Plus one typo fixed.
2006-10-02 16:46:12 +00:00
stronk7
af72e37237 Prevent "id" fields to be renamed. I can cause lots of problems. 2006-10-02 16:37:41 +00:00
stronk7
a2851e5f55 Basic rename_field() function added.
TODO: Automatic sequence/trigger/check constraint recreation
      under PG, MSSQL & Oracle
2006-10-01 23:02:39 +00:00
stronk7
4702d62e32 Change slighty the style of RenameKey and RenameIndex functions. 2006-09-30 22:59:10 +00:00
stronk7
a59f3a34f3 Initial commit of rename_table(). Not ended! 2006-09-30 22:40:15 +00:00
stronk7
9c4ee55b6c Added rename_key()
Note that this is one EXPERIMENTAL function and shouldn't be used
by you in production code EVER!
2006-09-30 19:44:49 +00:00
stronk7
6c89dc5514 Added rename_index()
Adding support for index renaming. Note that MySQL doesn't support this
but this shouldn't be important at all, mainly because, under xmldb,
accesses to index-names are always done with find_index_name() and
never explicity.
Anyway, this function could be useful in the future to normalize index
names in some Health center or another similar place.
2006-09-30 18:24:14 +00:00