Explorar el Código

srdb1/dbschema/sqlite: adjust binary column type to BLOB

The BYTEA was a mistake in first place (copied from postgres xsl).

SQlite needs the type to be BLOB for proper affinity. This is also
what the db_sqlite driver expects.
Timo Teräs hace 13 años
padre
commit
33e1ad7499

+ 1 - 1
doc/stylesheets/dbschema_k/xsl/db_sqlite.xsl

@@ -87,7 +87,7 @@
 	    </xsl:when>
 	    <xsl:when test="$type='binary' or
 						$type='largebinary'">
-		<xsl:text>BYTEA</xsl:text>
+		<xsl:text>BLOB</xsl:text>
 		<xsl:call-template name="column.size"/>
 		<xsl:call-template name="column.trailing"/>
 	    </xsl:when>

+ 1 - 1
utils/kamctl/db_sqlite/msilo-create.sql

@@ -9,7 +9,7 @@ CREATE TABLE silo (
     exp_time INTEGER DEFAULT 0 NOT NULL,
     snd_time INTEGER DEFAULT 0 NOT NULL,
     ctype VARCHAR(32) DEFAULT 'text/plain' NOT NULL,
-    body BYTEA DEFAULT '' NOT NULL,
+    body BLOB DEFAULT '' NOT NULL,
     extra_hdrs TEXT DEFAULT '' NOT NULL,
     callid VARCHAR(128) DEFAULT '' NOT NULL,
     status INTEGER DEFAULT 0 NOT NULL

+ 2 - 2
utils/kamctl/db_sqlite/presence-create.sql

@@ -7,7 +7,7 @@ CREATE TABLE presentity (
     etag VARCHAR(64) NOT NULL,
     expires INTEGER NOT NULL,
     received_time INTEGER NOT NULL,
-    body BYTEA NOT NULL,
+    body BLOB NOT NULL,
     sender VARCHAR(128) NOT NULL,
     CONSTRAINT presentity_presentity_idx UNIQUE (username, domain, event, etag)
 );
@@ -68,7 +68,7 @@ CREATE TABLE xcap (
     id INTEGER PRIMARY KEY NOT NULL,
     username VARCHAR(64) NOT NULL,
     domain VARCHAR(64) NOT NULL,
-    doc BYTEA NOT NULL,
+    doc BLOB NOT NULL,
     doc_type INTEGER NOT NULL,
     etag VARCHAR(64) NOT NULL,
     source INTEGER NOT NULL,

+ 1 - 1
utils/kamctl/db_sqlite/rls-create.sql

@@ -4,7 +4,7 @@ CREATE TABLE rls_presentity (
     rlsubs_did VARCHAR(255) NOT NULL,
     resource_uri VARCHAR(128) NOT NULL,
     content_type VARCHAR(255) NOT NULL,
-    presence_state BYTEA NOT NULL,
+    presence_state BLOB NOT NULL,
     expires INTEGER NOT NULL,
     updated INTEGER NOT NULL,
     auth_state INTEGER NOT NULL,