Changeset 546567
- Timestamp:
- 05/20/2012 12:57:04 PM (14 years ago)
- Location:
- postgresql-for-wordpress/trunk/pg4wp
- Files:
-
- 2 edited
-
driver_pgsql.php (modified) (1 diff)
-
driver_pgsql_install.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
postgresql-for-wordpress/trunk/pg4wp/driver_pgsql.php
r546556 r546567 373 373 // Load up upgrade and install functions as required 374 374 $begin = substr( $sql, 0, 3); 375 $search = array( 'SHO', 'ALT', 'DES', 'CRE' );375 $search = array( 'SHO', 'ALT', 'DES', 'CRE', 'DRO'); 376 376 if( in_array($begin, $search)) 377 377 { -
postgresql-for-wordpress/trunk/pg4wp/driver_pgsql_install.php
r545542 r546567 208 208 $sql = preg_replace( $pattern, '', $sql); 209 209 }// CREATE TABLE 210 elseif( 0 === strpos($sql, 'DROP TABLE')) 211 { 212 $logto = 'DROPTABLE'; 213 $pattern = '/DROP TABLE.+ [`]?(\w+)[`]?$/'; 214 preg_match($pattern, $sql, $matches); 215 $table = $matches[1]; 216 $seq = $table . '_seq'; 217 $sql .= ";\nDROP SEQUENCE IF EXISTS $seq;"; 218 }// DROP TABLE 210 219 211 220 return $sql;
Note: See TracChangeset
for help on using the changeset viewer.