Releases: zhenruyan/postgrebase
Releases · zhenruyan/postgrebase
Release list
v0.0.6
feat: switch to UUID-based IDs and remove DB-generated defaults - Replace random 15-char ID strings with RFC 4122 UUID v4 (36 chars) - Add tools/security/uuid.go with NewUUIDString() using github.com/google/uuid - Remove PostgreSQL uuid_generate_v4() extension dependency from init migration - Remove DEFAULT on ID columns — IDs are now generated by the application - Add migration 1719520000 to DROP DEFAULT on existing ID columns - Fix MySQL ID column size from VARCHAR(150) to VARCHAR(36) - Add Index.BuildForDriver() for driver-aware CREATE INDEX with proper quoting - Fix MySQL DROP INDEX to check existence via information_schema.statistics - Simplify panic recovery in tools/routine/routine.go - Update tests for new ID generation behavior
v0.0.5
fix: DateTime 解析改进、Relation 字段列定义、SQLite 迁移支持及测试修复 - DateTime: 默认布局改为含时区后缀(.000Z),Scan 支持多布局回退解析 - SchemaField: Relation 类型在 ColDefinition 中单独处理,区分单值/多值列定义 - migrate/runner: 新增 SQLite 迁移表创建支持(INTEGER NOT NULL) - redis_cache 测试: Redis 不可用时 skip,移除强制 t.Error - builder_mysql_test: 移除未使用的 getPreparedDB() 调用 - collection_test: 同步 JSON 序列化期望值(新增 displayName/project/cache 字段) - proposal 文档: 补充统一业务内核、项目边界约束、写操作授权等章节
v0.0.3
v0.0.2
v0.0.1
The author of PB is really excellent, and PB is a great work.
But we really need to run PB online in high pressure and complex environments. Sqlite cannot handle this scenario, so I am working hard to make it support cockroachdb and postgreSQL for cluster and standalone environments.(Preferably compatible with cockroachdb , but not yet dealing with pg dialects。 And due to time constraints, only the regular curd was tested, and the operation of the JSON function was not tested.)
Current modification progress, running cockroachdb by default as a single node by default
Then run PB to install and perform curd operations normally.
run cockroachdb
cockroach start-single-node --insecure
cockroach sql --insecure
CREATE DATABASE logs;
CREATE DATABASE data;
build pb
go build .\examples\base\
run pb --help
PocketBase CLI
Usage:
base.exe [command]
Available Commands:
admin Manages admin accounts
migrate Executes app DB migration scripts
serve Starts the web server (default to 127.0.0.1:8090)
update Automatically updates the current PocketBase executable with the latest available version
Flags:
--automigrate enable/disable auto migrations (default true)
--dataDsn string store data postgresql dsn(default postgresql://root@127.0.0.1:26257/data?sslmode=disable) (default "postgresql://root@127.0.0.1:26257/data?sslmode=disable")
--debug enable debug mode, aka. showing more detailed logs
--dir string the PocketBase data directory (default "D:\\src\\postgresqlbaseapi\\pb_data")
--encryptionEnv string the env variable whose value of 32 characters will be used
as encryption key for the app settings (default none)
-h, --help help for base.exe
--hooksDir string the directory with the JS app hooks
--hooksPool int the total prewarm goja.Runtime instances for the JS app hooks execution (default 50)
--hooksWatch auto restart the app on pb_hooks file change (default true)
--indexFallback fallback the request to index.html on missing static path (eg. when pretty urls are used with SPA) (default true)
--logDsn string store logs postgresql dsn(default postgresql://root@127.0.0.1:26257/logs?sslmode=disable) (default "postgresql://root@127.0.0.1:26257/logs?sslmode=disable")
--migrationsDir string the directory with the user defined migrations
--publicDir string the directory to serve static files (default "D:\\src\\postgresqlbaseapi\\pb_public")
--queryTimeout int the default SELECT queries timeout in seconds (default 30)
-v, --version version for base.exe
Use "base.exe [command] --help" for more information about a command.