PHPackages                             max13/laravel-sqfix - 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. max13/laravel-sqfix

ActiveLibrary[Database &amp; ORM](/categories/database)

max13/laravel-sqfix
===================

Laravel package fixing SQLite Schema grammar

v1.4.0(1mo ago)0314MITPHPPHP ^7.3|^8.0CI failing

Since Jan 9Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Max13/laravel-sqfix)[ Packagist](https://packagist.org/packages/max13/laravel-sqfix)[ Docs](https://github.com/max13/laravel-sqfix)[ GitHub Sponsors](https://github.com/sponsors/max13)[ Fund](https://adnan.rihan.fr/)[ RSS](/packages/max13-laravel-sqfix/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (10)Used By (0)

Laravel package fixing SQLite Schema grammar
============================================

[](#laravel-package-fixing-sqlite-schema-grammar)

[![Latest Version on Packagist](https://camo.githubusercontent.com/474a4652b40c781db8a0e811de9b69725b468e7199af0a88dfebdf6e8a7948b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4d617831332f6c61726176656c2d73716669782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Max13/laravel-sqfix)[![GitHub Tests Action Status](https://camo.githubusercontent.com/18091f3e1554612c6f1cd4ca65ffd0912ef212a85335f6712cf134c71774b7bd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f4d617831332f6c61726176656c2d73716669782f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/Max13/laravel-sqfix/actions?query=workflow%3ATests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/c38ef5002fcfd591d251d11f70972867b3d49f27797ee05d443dd3daaeff2993/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4d617831332f6c61726176656c2d73716669782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Max13/laravel-sqfix)

[`SQLite`](https://sqlite.org/) has many quirks, some of them are bugs and stayed like this because of legacy code, bugs that became features, etc… See the complete list on their website:

- [`ROWID`](https://sqlite.org/lang_createtable.html#rowid)s: Every table (except explicitely created `WITHOUT ROWID`) have a 64-bit signed integer column named `rowid`. This column has the same attributes expected for a `PRIMARY KEY` (starts at `1`, is an `INTEGER`, is `UNIQUE` across the table, and is usually incremented by `1` on every insert), and can reuse (in certain condition) previously deleted `rowid`s. Only the exact type (case insensitive) `INTEGER PRIMARY KEY` will make a column an alias of `rowid`. Which is recommended in most cases.
- [`AUTOINCREMENT`](https://sqlite.org/autoinc.html): When this keyword is used, it will use a different algorithm for `rowid`, briefly, an `AUTOINCREMENT` will make `SQLite` create an table used to track the increments (`sqlite_sequence`), `rowid`s are guaranteed to be increasing and never reused. *The AUTOINCREMENT keyword imposes extra CPU, memory, disk space, and disk I/O overhead and should be avoided if not strictly needed. It is usually not needed.*

This package replaces the default optimized behavior advised by `SQLite` and will have no effect on other drivers. `Laravel`’s ids are automatically created as aliases of `rowid`, and the `->trueSyntax()` modifier will use the "unfixed" SQL grammar.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require max13/laravel-sqfix
```

That’s it!

Compatibility list
------------------

[](#compatibility-list)

LaravelPackage version7, 8, 9, 10, 11`^v1.3.2`12, 13`^v1.4`Usage
-----

[](#usage)

```
Schema::create('jobs', function (Blueprint $table) {
    $table->bigIncrements('id');
    // …
});
```

The normal behavior of `Laravel` is to define the table `jobs` with the following statement:

```
create table "jobs" ("id" integer not null primary key autoincrement)
```

Which will both create a column named `id` distinct from `rowid` with the same properties. Double the work.

This package is making `Laravel` produce the following table:

```
create table "jobs" ("id" integer primary key)
```

Optimisation max.

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Adnan RIHAN](https://github.com/Max13)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance92

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

Every ~238 days

Recently: every ~186 days

Total

9

Last Release

40d ago

PHP version history (2 changes)v1.0.0PHP ^7.3|^7.4|^8.0

v1.1.0PHP ^7.3|^8.0

### Community

Maintainers

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

---

Top Contributors

[![Max13](https://avatars.githubusercontent.com/u/531249?v=4)](https://github.com/Max13 "Max13 (15 commits)")

---

Tags

max13laravel-sqfix

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/max13-laravel-sqfix/health.svg)

```
[![Health](https://phpackages.com/badges/max13-laravel-sqfix/health.svg)](https://phpackages.com/packages/max13-laravel-sqfix)
```

###  Alternatives

[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M186](/packages/spatie-laravel-backup)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[kreait/laravel-firebase

A Laravel package for the Firebase PHP Admin SDK

1.3k16.5M42](/packages/kreait-laravel-firebase)[bavix/laravel-wallet

It's easy to work with a virtual wallet.

1.3k1.1M11](/packages/bavix-laravel-wallet)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)

PHPackages © 2026

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