Download the PHP package srun/yii2-kingbase without Composer
On this page you can find all versions of the php package srun/yii2-kingbase. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download srun/yii2-kingbase
More information about srun/yii2-kingbase
Files in srun/yii2-kingbase
Package yii2-kingbase
Short Description Yii2 KingbaseES PostgreSQL-mode schema compatibility layer for SRun projects.
License MIT
Homepage https://github.com/srunsoft/kingbase
Informations about the package yii2-kingbase
srun/yii2-kingbase
Yii2 KingbaseES PostgreSQL-mode schema compatibility layer.
This package provides a Yii2 database connection class for KingbaseES deployments
that use the PostgreSQL-compatible PDO driver. It replaces Yii2's default
PostgreSQL schema metadata query that calls pg_get_serial_sequence(...), which
is not compatible with some KingbaseES environments.
Installation
Usage
Use the package connection class for Kingbase database components:
The connection class extends yii\db\Connection and maps the pgsql driver to
\srun\yii2\kingbase\Schema\KingbaseSchema.
If you need to keep using yii\db\Connection, you can configure the schema map
explicitly:
Why This Exists
Yii2's PostgreSQL schema metadata query normally includes:
In validated KingbaseES PDO pgsql environments, that query can fail during schema inspection. This package replaces the expression with:
Yii2 can still infer autoincrement behavior from column_default when it
contains nextval(...), so standard ActiveRecord insert flows remain usable.
Scope
This package only solves framework-level schema metadata compatibility.
It does not include:
- business table migrations
- data cleanup SQL
- service script fixes
- authentication mode fixes
- ClickHouse, Redis, or portal integration fixes
Verification Checklist
After enabling this package in a Yii2 project:
getTableSchema('migration')should work.- ActiveRecord insert operations with serial primary keys should work.
yii migrate --interactive=0should run without the previous metadata error.- Schema cache can remain enabled after clearing old cache entries.
If the project previously cached broken schema metadata, clear runtime cache:
Requirements
- PHP 7.4 or newer
- Yii2 2.x
pdo_pgsqlpdo
License
MIT