Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Enable/disable foreign key constraings for sqlite. #1449

wants to merge 5 commits into from

4 participants


Could you update the CHANGELOG file accordingly? Thanks.


As stated in #1447 this is not supported by older sqlite versions, we need to make sure it does not break applications using old sqlite versions.


And of course, unit tests as always are very welcome! ;-)

@resurtm resurtm was assigned

Merged manually: 33763f8

@resurtm resurtm closed this


we need to make sure it does not break applications using old sqlite versions

It won't. This case is unit tested (1b24643).


It won't. This case is unit tested (1b24643).

@resurtm also with sqlite < 3.7.10 ?


@cebe, i did some tests on PHP 5.2 (sqlite 3.3.7) and on PHP 5.4 (sqlite

  1. Testing script:
  2. PHP 5.2 (sqlite 3.3.7):
  3. PHP 5.4 (sqlite

Looks good to me. Btw, note that default sqlite version bundled with the latest PHP 5.2 is 3.3.7—our unit tests are all right.


Okay, cool :) Thanks for the effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 21, 2012
  1. @gleb-sternharz
  2. @gleb-sternharz

    Update CHANGELOG

    gleb-sternharz authored
  3. @gleb-sternharz

    Update CHANGELOG

    gleb-sternharz authored
  4. @gleb-sternharz

    Update framework/db/schema/sqlite/CSqliteSchema.php

    gleb-sternharz authored gleb committed
    Issue #1447
    Update CHANGELOG
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +1 −0  CHANGELOG
  2. +1 −2  framework/db/schema/sqlite/CSqliteSchema.php
@@ -39,6 +39,7 @@ Version 1.1.13 work in progress
- Enh #1369: Added CCheckBoxColumn::disabled that accepts PHP expression or anonymous function determining if checkbox for the row should be disabled (sucotronic)
- Enh #1386: Second parameter of the CHtml::value() is now able to accept anonymous function which calculates value to be used (Qiang, resurtm)
- Enh #1396: Added 'text/csv' mime-type for the 'csv' file extension in utils/mimeTypes.php (effectively used by e.g. CHttpRequest::sendFile()) (rawtaz)
+- Enh #1447: CSqliteSchema: Added enabling/disabling integrity check for sqlite (gleb-sternharz)
- Enh: Fixed the check for ajaxUpdate false value in jquery.yiilistview.js as that never happens (mdomba)
- Enh: Requirements checker: added check for Oracle database (pdo_oci extension) and MSSQL (pdo_dblib, pdo_sqlsrv and pdo_mssql extensions) (resurtm)
- Enh: Added CChainedLogFilter class to allow adding multiple filters to a logroute (cebe)
3  framework/db/schema/sqlite/CSqliteSchema.php
@@ -73,8 +73,7 @@ public function resetSequence($table,$value=null)
public function checkIntegrity($check=true,$schema='')
- // SQLite doesn't enforce integrity
- return;
+ $this->getDbConnection()->createCommand('PRAGMA foreign_keys='.($check?1:0))->execute();
Something went wrong with that request. Please try again.