Utils/SchemaUtils.php
changeset 59 ea562f37d7a5
parent 58 87bf6ec8af90
equal deleted inserted replaced
55:80a400379dd3 59:ea562f37d7a5
    88     }
    88     }
    89     
    89     
    90     public function filter_foreign_key(array $sqls)
    90     public function filter_foreign_key(array $sqls)
    91     {
    91     {
    92         $res_sqls = array();
    92         $res_sqls = array();
    93         //TODO : take the column and table names from the schema
       
    94         foreach ($sqls as $sql) {
    93         foreach ($sqls as $sql) {
    95             if(!preg_match("/ADD CONSTRAINT .+ FOREIGN KEY \(.*\) REFERENCES wikitag_document\(id\)/i", $sql))
    94             if(!preg_match("/ADD CONSTRAINT .+ FOREIGN KEY \(.*\) REFERENCES wikitag_document\(id\)/i", $sql))
    96             {
    95             {
    97                 $res_sqls[] = $sql;
    96                 $res_sqls[] = $sql;
    98             }
    97             }