【文件属性】:
文件名称:couch-to-postgres-php-dump:Couchdb 到 PostgreSQL php 转储脚本
文件大小:4KB
文件格式:ZIP
更新时间:2021-07-07 02:57:58
PHP
沙发到 postgres-php-dump
Couchdb 到 PostgreSQL php 转储脚本。
将 couchdb 文档同步到 postgres 表,可以停止并从它停止的地方继续。
当 couchdb 更改时,它还将更新 postgres 表,因此可以将其置于 cron 作业中以保持 postgres 表与 couchdb 同步 - 在 postgres 中需要 jsonb 字段类型。
如果不存在具有以下结构的表,将在 postgres 中创建表:
CREATE TABLE mytable
(
id text NOT NULL,
doc jsonb,
CONSTRAINT mytable_pkey PRIMARY KEY (id)
)
然后,这允许对您的 couchdbs 进行 sql 查询,例如:
SELECT id, doc->>'name' as
【文件预览】:
couch-to-postgres-php-dump-master
----README.md(3KB)
----LICENSE(1KB)
----couchtopostgres.php(5KB)