Commit Graph

66 Commits

Author SHA1 Message Date
b7064779f5 Updated copyright notice in header 2007-10-10 05:25:14 +00:00
da40b0beab And now, the unused getStandardNameForObject() is out. Back to the
exclusive getNameForObject() function, ONLY USED TO CREATE NEW
OBJECTS, NEVER TO GUESS THE NAME OF EXISTING ONES. MDL-9356
2007-09-11 19:37:13 +00:00
4215e41ecb Extending getCheckConstraintsFromDB() to support a new parameter
used to filter what field in the table we want to know
its check constraints
2007-09-09 16:28:16 +00:00
af999b9095 Temporary fix for MDL-9356 becuase it was blocking a bug I needed to fix. Eloy, please review carefully when you get back from holiday. 2007-08-17 09:59:54 +00:00
8101dccb8e MDL-9920 Allowed xmldb to create 32-bit serial fields if specified, in postgres 2007-05-24 15:18:35 +00:00
9770914d5f Now MySQL looks for existing index names. MDL-9256
Merged from MOODLE_18_STABLE
2007-04-08 22:59:54 +00:00
c5e065f817 Clarify a bit getNameForObject correct usage. 2007-01-28 11:46:17 +00:00
2a82cacf0b getting tired of restore my test Oracle DB. Typo! 2007-01-28 00:30:22 +00:00
fec5fe881e Quote field names in rename in order to allow renaming of reserved words. 2007-01-28 00:20:54 +00:00
d21a42d7cf Small improvement. One less iteration pero object name requested. 2007-01-27 20:08:19 +00:00
d65980452a Updated comment. 2007-01-27 17:41:31 +00:00
f2daac4e62 Delegate to the isNameInUse() function the request to
see if one object name is in use in the DB (to avoid
duplicates 100%) MDL-7376 (the rest will come tomorrow)
2007-01-27 01:12:18 +00:00
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
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
f14080b0ad Prevent "id" fields to be renamed in generators 2006-10-02 16:47:02 +00:00
0e204a1012 Some adjustments to be able to get names without prefix 2006-10-02 16:28:51 +00:00
7c07a93223 Added rename_field() support.
TODO: Sync sequences, triggers and check constraints
2006-10-01 22:54:51 +00:00
2cfea485a6 Added getDefaultValue() for better handling of default values 2006-10-01 15:47:48 +00:00
f6ebc34100 Fixed one wrong "return false" plus minor code reorder... 2006-10-01 14:39:50 +00:00
c58facdd96 New installation with different prefix in one database fails MDL-6614 2006-10-01 09:47:20 +00:00
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
4702d62e32 Change slighty the style of RenameKey and RenameIndex functions. 2006-09-30 22:59:10 +00:00
a59f3a34f3 Initial commit of rename_table(). Not ended! 2006-09-30 22:40:15 +00:00
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
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
b899d9bf1d Added support to change_field_enum() across all RDBMS 2006-09-30 17:03:17 +00:00
ed37b15464 Moving some uses of find_index_name() to index_exists() 2006-09-30 15:00:46 +00:00
4103c3545c Prevent tables without prefix to be duplicated at install time. MDL-6614 2006-09-30 14:36:52 +00:00
512a237ff6 One more use of getTableName() added. 2006-09-30 12:34:17 +00:00
97b9178459 New getTableName() function to get normalised table names everywhere 2006-09-30 12:03:19 +00:00
6e152cc621 Now basic types of conversion (int2char, char2int, number2char, char2number)
are working properly under all RDBMS.
2006-09-29 17:49:04 +00:00
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
ac5ff0e787 fixed one wrong constant 2006-09-28 20:12:00 +00:00
4690f076ca Now keys and indexes are PERFECT (argh, Oracle, once more was causing problems) 2006-09-28 18:56:21 +00:00
0852990f9b Deleting some parameters that aren't needed anymore. Code will
decide if creating underlying indexes for keys automatically now.

Also, add_key() and drop_key() are working (with sync of undelying
indexes automated)
2006-09-28 17:20:21 +00:00
618a982eed Now all the generators support creating and dropping indexes 2006-09-26 23:15:20 +00:00
48eac31328 Replaced XMLDB own implementation of the concat function to use
the new, ultra-cool, ADOdb based, concat_sql(). Thanks, Martin Langhoff!
2006-09-26 18:34:48 +00:00
0db2d6bb98 Prevent NOT NULL fields to have one DEFAULT NULL clause 2006-09-25 21:44:21 +00:00
812e363a39 Now generators support to add/drop column defaults 2006-09-25 18:22:06 +00:00
d3b93bd26a Add skip parameters to one getFieldSQL call requiring them 2006-09-24 15:26:49 +00:00
19c8321e07 Now Oracle supports the first part of alter table alter column statements 2006-09-24 00:02:34 +00:00
0e9e0b3bb3 adding support for alter columns
(not finished yet)
2006-09-23 21:24:51 +00:00
4feeadeb59 Minor fix to be able to drop tables without prefix properly (adodb_log) 2006-09-22 16:16:48 +00:00
7f5f956cf5 Allow to specify NULL clauses for some generators, mainly because
some mssql drivers use to create everything as NOT NULL by default.
2006-09-21 17:04:28 +00:00
eef868d17d major whitespace cleanup - fixed trailng whitespace in new files and admin area 2006-09-20 21:00:45 +00:00
f0b50bbe89 Now the "AFTER" clause is supported by add_field() 2006-09-12 22:58:04 +00:00
3ab2610037 Added functions to retrieve the proper add and drop field SQL. 2006-09-12 22:15:00 +00:00
2ebd596764 Avoid one minor error when tables hasn't comments to be defined. 2006-09-10 21:05:55 +00:00
3a8c55c3fb Typos + drop table fully supported. 2006-09-07 18:39:43 +00:00
8830218f53 Initial support for DROP TABLE adedd. 2006-09-07 17:28:46 +00:00