DB's:
MySQL:
CREATE TABLE `config` (
`collection` varchar(255) CHARACTER SET ascii NOT NULL DEFAULT '' COMMENT 'Primary Key: Config object collection.',
`name` varchar(255) CHARACTER SET ascii NOT NULL DEFAULT '' COMMENT 'Primary Key: Config object name.',
`data` longblob COMMENT 'A serialized configuration object data.',
PRIMARY KEY (`collection`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='The base table for configuration data.'
Postgres:
CREATE TABLE public.config
(
collection character varying(255) NOT NULL DEFAULT ''::character varying, -- Primary Key: Config object collection.
name character varying(255) NOT NULL DEFAULT ''::character varying, -- Primary Key: Config object name.
data bytea, -- A serialized configuration object data.
CONSTRAINT config____pkey PRIMARY KEY (collection, name)
)
SQLite:
CREATE TABLE config (
collection VARCHAR(255) NOT NULL DEFAULT '',
name VARCHAR(255) NOT NULL DEFAULT '',
"data" BLOB(2000000000) DEFAULT NULL,
CONSTRAINT CONFIG_PK PRIMARY KEY (collection,name)
);
CREATE UNIQUE INDEX sqlite_autoindex_config_1 ON config (collection,name);
I want a compatible code: to save and retrieve (BLOB, BYTEA) data.
Any ideas?