diff options
author | stuconnolly <stuart02@gmail.com> | 2012-09-09 08:06:09 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2012-09-09 08:06:09 +0000 |
commit | 686fa6b54f408a3d81e8467aad8a5238edf35466 (patch) | |
tree | cb5759f3629bd315cbf33e50578b74bf05de36d6 /Frameworks/PostgresKit | |
parent | 38adbb6ec450553074432db1dc0c4907dc064e8e (diff) | |
download | sequelpro-686fa6b54f408a3d81e8467aad8a5238edf35466.tar.gz sequelpro-686fa6b54f408a3d81e8467aad8a5238edf35466.tar.bz2 sequelpro-686fa6b54f408a3d81e8467aad8a5238edf35466.zip |
Test data script tweaks.
Diffstat (limited to 'Frameworks/PostgresKit')
-rw-r--r-- | Frameworks/PostgresKit/Resources/TestData.sql | 13 | ||||
-rw-r--r-- | Frameworks/PostgresKit/Source/FLXPostgresTypes.h | 1 |
2 files changed, 10 insertions, 4 deletions
diff --git a/Frameworks/PostgresKit/Resources/TestData.sql b/Frameworks/PostgresKit/Resources/TestData.sql index 5d946918..ebcf6309 100644 --- a/Frameworks/PostgresKit/Resources/TestData.sql +++ b/Frameworks/PostgresKit/Resources/TestData.sql @@ -14,7 +14,15 @@ BEGIN; SET datestyle = 'DMY'; SET client_encoding = 'UNICODE'; -CREATE TABLE IF NOT EXISTS data_types +IF EXISTS ( + SELECT 1 FROM information_schema.tables + WHERE table_name = 'data_types' + AND table_type = 'BASE TABLE' +) + DROP TABLE data_types; +END + +CREATE TABLE data_types ( int_field INT PRIMARY KEY NOT NULL, smallint_field SMALLINT NOT NULL, @@ -30,9 +38,6 @@ CREATE TABLE IF NOT EXISTS data_types timestamptz_field TIMESTAMP WITH TIME ZONE NOT NULL ); --- If the table existed, get rid of all it's data -TRUNCATE TABLE data_types; - INSERT INTO data_types ( int_field, smallint_field, diff --git a/Frameworks/PostgresKit/Source/FLXPostgresTypes.h b/Frameworks/PostgresKit/Source/FLXPostgresTypes.h index 5c09e5d8..039a8282 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresTypes.h +++ b/Frameworks/PostgresKit/Source/FLXPostgresTypes.h @@ -111,5 +111,6 @@ enum // Numeric FLXPostgresOidNumeric = 1700, // StringHandler => NSString + // UUID FLXPostgresOidUUID = 2950 // StringHandler => NSString }; |