238 Commits

Author SHA1 Message Date
stronk7
db9940b605 PHP generated code must use $result instead of $status. MDL-7533
Merged from MOODLE_17_STABLE
2006-11-18 19:08:10 +00:00
stronk7
8b755329fa Adding PIVOT as MSSQL reserved word
Merged from MOODLE_17_STABLE
2006-10-28 23:13:26 +00:00
stronk7
5bbe483102 Now, on error, the new XMLDB->debug($msg) function is called.
It provides the facility to hook to one external function, if
available: xmldb_debug($message, $xmldb_object) to perform
custom debugging/logging. MDL-7261
2006-10-28 15:18:40 +00:00
stronk7
04c9f8dcc2 One typo (!==) was preventing defaults to be properly calculated for integers.
Thanks to Nigel McNie for being on that!

Merged from MOODLE_17_STABLE
2006-10-21 16:36:16 +00:00
mjollnir_
722c3bfede error reporting for xmldb (credit: Nigel McNie <nigel@catalyst.net.nz>) 2006-10-19 23:30:28 +00:00
stronk7
bf42ceed7f Addding support for the new mssql_n ADOdb driver that,
transparently, prepends the N char for all the string
literals being set to MSSQL (until MS Unicode - standard-
support will arrive).

Merged from MOODLE_17_STABLE
2006-10-19 17:29:37 +00:00
stronk7
d5eff6795e Added support for getSequenceFromDB() to PG.
Merged from MOODLE_17_STABLE
2006-10-16 17:36:13 +00:00
stronk7
906eebf6ad Small change in rename_field() so objects won't become modified at all
in the process.

Merged from MOODLE_17_STABLE
2006-10-12 12:28:36 +00:00
stronk7
354bb6035a And now, Moodle is able to work with the odbc_mssql driver. Simple! B-) 2006-10-09 22:29:52 +00:00
stronk7
abbd460ff9 Adding getSequenceFromDB() for Oracle in order to detect the correct
sequence name in the insert_record() function.
2006-10-08 09:36:33 +00:00
stronk7
2ddec1f4ac Changed PG rename_index() to use the old ALTER TABLE ... RENAME TO syntax
(pretty strange syntax, but seems to work)
2006-10-03 15:00:55 +00:00
stronk7
ae5a83e6fd rename_field() under mssql completed 2006-10-02 17:42:14 +00:00
stronk7
c562997ff8 rename_field() under oracle completed 2006-10-02 17:06:37 +00:00
stronk7
86bb076fc4 rename_field() under postgresql completed. 2006-10-02 17:02:35 +00:00
stronk7
dc7c388280 MySQL doesn't have check constraints. We use enums instead. 2006-10-02 17:02:07 +00:00
stronk7
f14080b0ad Prevent "id" fields to be renamed in generators 2006-10-02 16:47:02 +00:00
stronk7
0e204a1012 Some adjustments to be able to get names without prefix 2006-10-02 16:28:51 +00:00
stronk7
6c02f04b5a rename_table() under postgresql completed 2006-10-02 16:27:18 +00:00
stronk7
bb7e5c472c rename_table() under oracle completed 2006-10-02 16:19:48 +00:00
stronk7
2f21754261 With the emotion, I forgot to delete some debug lines... :-P 2006-10-02 15:57:59 +00:00
stronk7
8aaf86642c rename_table() under mssql completed! B-) 2006-10-02 15:56:34 +00:00
stronk7
7c07a93223 Added rename_field() support.
TODO: Sync sequences, triggers and check constraints
2006-10-01 22:54:51 +00:00
stronk7
4de0723f31 Added rename_field() support for mssql 2006-10-01 22:52:30 +00:00
stronk7
b5d61bfd9d Added rename_field() support for MySQL 2006-10-01 22:44:39 +00:00
stronk7
51517ddc6d Avoid some double updates under PG 2006-10-01 16:02:09 +00:00
stronk7
1f0c7fae15 Now PG adds fields in various steps is order to fulfill 7.4 min req 2006-10-01 15:48:29 +00:00
stronk7
2cfea485a6 Added getDefaultValue() for better handling of default values 2006-10-01 15:47:48 +00:00
stronk7
f6ebc34100 Fixed one wrong "return false" plus minor code reorder... 2006-10-01 14:39:50 +00:00
skodak
c58facdd96 New installation with different prefix in one database fails MDL-6614 2006-10-01 09:47:20 +00:00
stronk7
abf980a587 Now table renaming is working properly on PostgreSQL
(only renaming of check constraints are pending)
2006-10-01 08:44:55 +00:00
stronk7
20c559dd8d Now Oracle supports table renaming (both sequence and triggers
are kept on sync with the new table name)
2006-09-30 23:48:34 +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
57770f7a50 Adding support to 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:16 +00:00
stronk7
e77fd021e6 Implemented rename_key()
Note that this is one EXPERIMENTAL function and shouldn't be used
by you in production code EVER!
2006-09-30 19:43:16 +00:00
stronk7
1c86ef5b1c 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:23:00 +00:00
stronk7
b899d9bf1d Added support to change_field_enum() across all RDBMS 2006-09-30 17:03:17 +00:00
stronk7
ed37b15464 Moving some uses of find_index_name() to index_exists() 2006-09-30 15:00:46 +00:00
stronk7
4103c3545c Prevent tables without prefix to be duplicated at install time. MDL-6614 2006-09-30 14:36:52 +00:00
stronk7
512a237ff6 One more use of getTableName() added. 2006-09-30 12:34:17 +00:00
stronk7
9af19c728d Extendig use of new getTableName() over all generators 2006-09-30 12:13:07 +00:00
stronk7
97b9178459 New getTableName() function to get normalised table names everywhere 2006-09-30 12:03:19 +00:00
stronk7
6e152cc621 Now basic types of conversion (int2char, char2int, number2char, char2number)
are working properly under all RDBMS.
2006-09-29 17:49:04 +00:00
stronk7
599caff8c5 prevent nulls to become nulls (oracle error)
and defaults null to become defaults null
when temporary columns are used
2006-09-28 23:06:04 +00:00
stronk7
d54f85efa6 minor adjust. keytype to drop keys is not needed anymore. now it's
defined in mysql generator (the only one needing it)
2006-09-28 21:47:36 +00:00
stronk7
ac5ff0e787 fixed one wrong constant 2006-09-28 20:12:00 +00:00
stronk7
9c46a7e6f9 changed mysql drop index syntax. Nothing relevant. 2006-09-28 20:11:30 +00:00
stronk7
4690f076ca Now keys and indexes are PERFECT (argh, Oracle, once more was causing problems) 2006-09-28 18:56:21 +00:00
stronk7
4df8b6cdfc some more settings go to XMLDBGenerator (as they are default) 2006-09-28 18:39:33 +00:00
stronk7
1a275daaaf some more settings go to XMLDBGenerator (as they are default) 2006-09-28 18:31:28 +00:00