57 Commits

Author SHA1 Message Date
Adrian Greeve
3a8c989137 MDL-59561 database: Update to creating new indexes in mysql.
When updating the mysql system to utf8mb4 not all tables are
converted to the row format of compressed or dynamic. If a new
index is created there is a possibility that the table could be
using compact or redundant and then an error will be shown saying
that the index size is too large. This fix handles this exception
and converts the table over to compressed.
2017-07-21 09:27:08 +08:00
Simey Lameze
87a3e50192 MDL-51374 core_dml: change database layer to pass table name as parameter 2016-03-15 14:43:45 +08:00
Tim Hunt
5dc266d980 MDL-46918 ddl: fix error when renaming table already exists 2014-08-21 18:33:22 +01:00
Petr Skoda
4153a7483d MDL-45985 ddl: improve check_database_schema method in database_manager 2014-06-17 16:53:36 +12:00
Petr Skoda
3f17d7091b MDL-43761 refactor db manager code to send arrays of SQL to the dml driver 2014-01-24 13:45:07 +08:00
Petr Škoda
f092d92004 MDL-21116 drop plugin tables in opposite order
This should help with foreign key in the future.
2012-12-22 19:01:00 +01:00
Petr Skoda
bd991d03cf MDL-33018 add general index type hints and use PostgreSQL varchar_pattern_ops index type for context.path
This significantly improves performance of accesslib queries,
credit for the discovery of this solution goes to Andrew Masterton from OU.
2012-07-06 08:19:39 +02:00
Petr Skoda
d8bf2a14b6 MDL-32003 last db related phpdocs cleanup commit 2012-06-17 22:56:30 +02:00
Petr Skoda
a6d9d4efc2 MDL-32003 fix PHP4-isms in core xmldb code 2012-06-17 22:56:29 +02:00
Petr Skoda
5a070f0477 MDL-32003 fix phpdocs in DDL layer 2012-06-17 22:56:28 +02:00
Petr Skoda
a66b2ae4f4 MDL-32434 deprecate drop_temp_table() in favour of drop_table() 2012-04-15 12:23:15 +02:00
Petr Skoda
5bd4040866 MDL-31857basic phpunit support
Thanks Eloy Lafuente, Tim Hunt and Sam Hemelryk for valuable feedback and ideas.
2012-03-21 10:31:37 +01:00
Petr Skoda
05aae0a571 MDL-29514 drop support for enum data types 2012-03-10 21:36:48 +01:00
Petr Skoda
e9e4a4a672 MDL-27982 convert all signed to unsigned and prevent adding of new unsigned columns
Conflicts, amended to use .02 versions:

	lib/db/upgrade.php, version.php
2012-03-06 12:03:59 +01:00
Eloy Lafuente (stronk7)
3360b13bac MDL-31251 documentation : fix incorrect docs 2012-02-16 17:59:02 +01:00
Aparup Banerjee
83a4ee1ea0 MDL-31251 documentation : improved core ddl API phpdocs. (used moodlecheck plugin) 2012-02-10 12:42:46 +08:00
Petr Skoda
dd63e0ff65 fixed $table when throwing exception 2010-09-17 20:19:05 +00:00
Petr Skoda
c86f538116 MDL-21249 improved php docs and adding direct access prevention in ddl 2010-07-25 12:57:03 +00:00
Petr Skoda
72c45dcc1b DDL comment typos 2010-05-21 18:37:22 +00:00
Eloy Lafuente
5cada36315 MDL-22366 upgrade - always drop DB objects conditionally 2010-05-06 16:03:02 +00:00
Eloy Lafuente
a97c0dd598 MDL-21015 - add optional xmldb_structure cache in the install_one_table_from_xmldb_file()
method. 100x speedup for UnitTestCaseUsingDatabase tests. Defaults to false (old behaviour)
2009-12-01 18:10:51 +00:00
Petr Skoda
117bd74897 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 11:31:16 +00:00
stronk7
15a0ffc8f0 MDL-20349 find_sequence_name() is out. No need to use it anymore. 2009-10-11 21:52:40 +00:00
stronk7
f713581bc3 MDL-14679 table/column meta cache is reset on each request and DDL operation.
No need to call it with false parameter but in very exceptional ocasions.
2009-09-28 23:16:05 +00:00
stronk7
f94f10ca81 temp tables behaviour change: exception if exits on creation (like normal tables) 2009-09-09 09:41:37 +00:00
stronk7
4ff402d68e MDL-15181 temporary tables support. No more differences in table_exists() +
implemented temptables store for mysql.
2009-08-31 15:47:46 +00:00
stronk7
b1ca138716 SQL generators must not execute changes in DB. Just provide the needed SQL
in order to make database_manager to execute it. reset_sequence reimplemented.
2009-08-31 14:23:40 +00:00
stronk7
0f887b881e Delete the tweakTempTable() thing used to support temp tables in mssql.
Was hacky and incomplete. Proper solution must be mssql exclusive.
2009-08-28 17:30:18 +00:00
stronk7
d274f2096b MDL-19695 dependencies - now every change_field_xxx() method looks for dependencies 2009-07-30 18:54:54 +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
17da2e6f28 MDL-16438 centralise information about plugins to avoid duplication, includes local customisation conversion to standard plugin structure + fixes for some recent regressions; see tracker for more details and links to docs and forums discussions 2009-06-19 14:25:56 +00:00
skodak
94b6329544 MDL-14679 license header fixes 2009-06-12 08:44:49 +00:00
stronk7
5b49a67cc1 MDL-18577 drop enums - annotating one more function to be dropped in Moodle 2.1 2009-05-25 14:43:29 +00:00
stronk7
2d2d79ef49 MDL-18577 drop enums support - step3: Drop enums from generator classes. Only code used to drop enums remains until Moodle 2.1 2009-05-01 23:49:31 +00:00
stronk7
2a88f626f7 MDL-18577 drop enums support - step2: enums out from editor, dbmanager and all upgrade scripts. 2009-05-01 01:19:16 +00:00
stronk7
e37cd84ad4 MDL-18577 drop enums support - step1: transforming all enums to nomal varchar + prevent creation of new ones 2009-04-27 20:29:01 +00:00
tjhunt
465d96958f UnitTestCaseUsingDatabase: fix bug with install_one_table_from_xmldb_file
The bug prevented you creating the first table from an install.xml file
2009-04-07 05:19:20 +00:00
tjhunt
67d5e9df39 ddl: New method install_one_table_from_xmldb_file ready for MDL-18607 unit test changes.
Plus small refactoring to avoid duplicating code.
2009-03-23 04:04:37 +00:00
skodak
1045a0074c MDL-17849 sql queries not printed by default during upgrade anymore, there is a new config.php only setting $CFG->upgradeshowsql instead 2009-01-12 16:52:53 +00:00
skodak
be415e95be MDL-17354 moved reset_sequence into dbmanager 2008-11-21 21:40:50 +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
3eefe57bd1 removing forgotten grrr debug code ;-) 2008-09-01 20:04:18 +00:00
skodak
ebf20af07d MDL-15635 dml library inclusion refactoring 2008-08-30 18:48:39 +00:00
skodak
f4caf0df5e MDL-15669 Check db schema vs install.xml - code by Andrei Bautu, with minor changes only (more strict checking) 2008-08-25 22:02:49 +00:00
skodak
0549c245e1 MDL-15071 new method for installing of table from xmld structure - credit goes to Andrei Bautu 2008-07-13 20:27:14 +00:00
skodak
eee5d9bb85 MDL-14956 DDL exceptions 2008-06-22 16:51:55 +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
96d1387809 MDL-14679 towards adodb separation 2008-06-09 18:48:28 +00:00
skodak
b922e86b7a MDL-15181 temp table support in ddl/dml 2008-06-07 14:41:01 +00:00