Issue Details (XML | Word | Printable)

Key: MDL-15671
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Petr Skoda
Reporter: Andrei Bautu
Votes: 0
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-15635

Add reset_sequence to db layer

Created: 16/Jul/08 05:02 PM   Updated: 25/Aug/08 09:00 PM
Component/s: Database SQL/XMLDB
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: 1. Text File 200807311107-MDL-15671.patch (7 kB)


Participants: Andrei Bautu and Petr Skoda
Security Level: None
Resolved date: 25/Aug/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Andrei Bautu added a comment - 20/Jul/08 07:17 AM - edited
I still believe that sequence reset belongs to ddl. Yes, it uses some data (max(id)) which will be retrieved by dml, but the workhorse should be in ddl (with a generic bootstrap method in dml).
Instead of copy/pasting the same code for each driver type, this approach would allow statements to be reuse per db type. For example, like in the case of CREATE SEQUENCE, CREATE TABLE, etc, ALTER TABLE xyz AUTO_INCREMENT value it's the same for MySQL no matter what driver type you use (adodb, pdo, native).

Petr Skoda added a comment - 25/Aug/08 09:00 PM
code committed into cvs, minor changes related to table_exists() and return values added.

thanks!