Mercurial > hg > orthanc-databases
diff PostgreSQL/Plugins/PostgreSQLStorageArea.cpp @ 237:35598014f140
refactoring to remove GlobalProperties.cpp
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 08 Apr 2021 19:09:04 +0200 |
parents | a4918d57435c |
children | d663d9e44f8d |
line wrap: on
line diff
--- a/PostgreSQL/Plugins/PostgreSQLStorageArea.cpp Thu Apr 08 12:00:01 2021 +0200 +++ b/PostgreSQL/Plugins/PostgreSQLStorageArea.cpp Thu Apr 08 19:09:04 2021 +0200 @@ -53,14 +53,14 @@ if (!db.DoesTableExist("StorageArea")) { - db.Execute("CREATE TABLE IF NOT EXISTS StorageArea(" - "uuid VARCHAR NOT NULL PRIMARY KEY," - "content OID NOT NULL," - "type INTEGER NOT NULL)"); + db.ExecuteMultiLines("CREATE TABLE IF NOT EXISTS StorageArea(" + "uuid VARCHAR NOT NULL PRIMARY KEY," + "content OID NOT NULL," + "type INTEGER NOT NULL)"); // Automatically remove the large objects associated with the table - db.Execute("CREATE OR REPLACE RULE StorageAreaDelete AS ON DELETE " - "TO StorageArea DO SELECT lo_unlink(old.content);"); + db.ExecuteMultiLines("CREATE OR REPLACE RULE StorageAreaDelete AS ON DELETE " + "TO StorageArea DO SELECT lo_unlink(old.content);"); } t.Commit();