PHPackages                             santilin/yii2-sqlite3-full-support - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. santilin/yii2-sqlite3-full-support

ActiveYii2-extension[Database &amp; ORM](/categories/database)

santilin/yii2-sqlite3-full-support
==================================

Add extended support for sqlite driver for Yii2

v0.1.0.x-dev(2y ago)427LGPL-3.0+PHP

Since Jan 31Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/santilin/yii2-sqlite3-full-support)[ Packagist](https://packagist.org/packages/santilin/yii2-sqlite3-full-support)[ Docs](https://github.com/santilin/yii2-sqlite3-full-support)[ RSS](/packages/santilin-yii2-sqlite3-full-support/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

yii2-sqlite3-full-support
=========================

[](#yii2-sqlite3-full-support)

Adds support for unsupported sqlite3 ALTER TABLE comands to Yii2 following the procedures stated at [https://www.sqlite.org/lang\_altertable.html#otheralter](https://www.sqlite.org/lang_altertable.html#otheralter)

Provides also a seamlessly translation of MySQL expressions into sqlite expressions.

Manages DDL statements with attached databases

Done
----

[](#done)

- Drop column
- Alter column
- Add foreign key
- Add primary key
- Drop primary key
- Drop foreign key (works well with migrate/fresh which passes index of foreign key instead of name)
- Drop Unique
- Expression translating:
    - NOW() =&gt; 'CURRENT\_TIMESTAMP'
    - UNIX\_TIMESTAMP() =&gt; CAST(strftime('%s', 'now') AS INT)
    - CONCAT =&gt; ||
    - AUTO\_INCREMENT =&gt; Ignored
    - GROUP\_CONCAT(expr SEPARATOR '/') =&gt; GROUP\_CONCAT(expr, '/')

TODO
----

[](#todo)

- Add Check
- Drop Check
- Add default value
- Drop default value
- Add comment on column
- Drop comment from column
- Add Comment on table
- Drop comment from table
- buildSubqueryInCondition

Install
=======

[](#install)

```
require "santilin/yii2-sqlite3-full-support": "*"

```

Usage
=====

[](#usage)

The extension works out of the box without any configuration. The boostrap of this extension replaces the className of yii\\db\\sqlite\\QueryBuilder to point to this custom QueryBuilder.

Caveats
=======

[](#caveats)

Foreign key disabling
---------------------

[](#foreign-key-disabling)

When using `safeUp` and `safeDown` in a migration that includes `Drop column`, `Alter column`, `Add foreign key`, `Rename column` and `Drop foreign key` the migration fails because the `pragma foreignkeys` only works outside transactions. You have to use `up` and `down` instead in your migration. A exception is thrown if foreign keys can not be disabled.

You can force the migration even if foreign keys can not be disabled defining the environment variable YII2\_SQLITE3\_NO\_ENABLE\_FOREIGN\_CHECKS

```
YII2_SQLITE3_DISABLE_FOREIGN_CHECKS=1 ./yii migrate/fresh

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance57

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

835d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b16ae1dcf41648aee474b168b3b8e8232d9e5f5a1db1921246305bc5deac48c2?d=identicon)[santilin](/maintainers/santilin)

---

Top Contributors

[![santilin](https://avatars.githubusercontent.com/u/6593992?v=4)](https://github.com/santilin "santilin (38 commits)")

---

Tags

sqlite3yii2-extensionsqliteyii2extension

### Embed Badge

![Health badge](/badges/santilin-yii2-sqlite3-full-support/health.svg)

```
[![Health](https://phpackages.com/badges/santilin-yii2-sqlite3-full-support/health.svg)](https://phpackages.com/packages/santilin-yii2-sqlite3-full-support)
```

###  Alternatives

[dmstr/yii2-db

Database extensions

19618.8k6](/packages/dmstr-yii2-db)[sjaakp/yii2-spatial

Yii2 ActiveRecord supporting MySQL spatial data

1873.8k1](/packages/sjaakp-yii2-spatial)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
