From: Nicolas Boisselier Date: Sun, 11 Dec 2022 19:07:56 +0000 (+0100) Subject: sql.drop use function to unvar() X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=b5269822d8f9a3f640401c8f3b3ef6ceabf760cb;p=nb.git sql.drop use function to unvar() --- diff --git a/lib/php/db/types/pgsql.php b/lib/php/db/types/pgsql.php index 9cfad424..d0bb9b7c 100644 --- a/lib/php/db/types/pgsql.php +++ b/lib/php/db/types/pgsql.php @@ -6,7 +6,8 @@ $DB_TYPES['pgsql'] = array ( 'schema.post' => [ 'COMMIT', ], -'sql.drop' => 'DROP IF EXISTS "" CASCADE', +# NB 11.12.22: 'sql.drop' => 'DROP IF EXISTS "" CASCADE', +'sql.drop' => function(&$table) { $table->unvar('DROP IF EXISTS "" CASCADE'); }, 'delete_no_limit' => true, 'replace_insert' => function(&$sql,&$table,$fields=[]) { $keys = $table->fields_keys($others);