{"id":25508322,"url":"https://github.com/sausin/laravel-set-autoincrement","last_synced_at":"2026-04-11T06:03:35.514Z","repository":{"id":48805771,"uuid":"254659352","full_name":"sausin/laravel-set-autoincrement","owner":"sausin","description":"Easily set the auto increment index for your tables in a laravel project","archived":false,"fork":false,"pushed_at":"2021-07-11T05:50:25.000Z","size":42,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-17T21:04:13.801Z","etag":null,"topics":["auto","autoincrement","database","database-management","database-migrations","increment","laravel","mysql","php","sqlite"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sausin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-10T14:47:38.000Z","updated_at":"2021-10-16T17:35:34.000Z","dependencies_parsed_at":"2022-08-25T05:50:56.086Z","dependency_job_id":null,"html_url":"https://github.com/sausin/laravel-set-autoincrement","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sausin%2Flaravel-set-autoincrement","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sausin%2Flaravel-set-autoincrement/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sausin%2Flaravel-set-autoincrement/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sausin%2Flaravel-set-autoincrement/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sausin","download_url":"https://codeload.github.com/sausin/laravel-set-autoincrement/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239619448,"owners_count":19669447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto","autoincrement","database","database-management","database-migrations","increment","laravel","mysql","php","sqlite"],"created_at":"2025-02-19T07:58:13.446Z","updated_at":"2025-11-20T10:30:13.430Z","avatar_url":"https://github.com/sausin.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel package to set custom Auto Increment in database\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/sausin/laravel-set-autoincrement.svg?style=flat-square)](https://packagist.org/packages/sausin/laravel-set-autoincrement)\n[![Total Downloads](https://img.shields.io/packagist/dt/sausin/laravel-set-autoincrement.svg?style=flat-square)](https://packagist.org/packages/sausin/laravel-set-autoincrement)\n[![Quality Score](https://img.shields.io/scrutinizer/g/sausin/laravel-set-autoincrement.svg?style=flat-square)](https://scrutinizer-ci.com/g/sausin/laravel-set-autoincrement)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)\n\nWanted to easily set the starting ID for your models? This package makes it easy as a breeze! It's also possible to change auto increment on existing databases (i.e. new entries will start from the specified number).\n\n# Installation\n\nRun the below command in your Laravel project root.\n```sh\ncomposer require sausin/laravel-set-autoincrement\n```\nThis will install the latest version of the package for you. The service provider will automatically register and make available the features of the package (which work automatically).\n\n# Configuration\n\nThe default configuration will set the package such that except a few tables, the `AUTO_INCREMENT` counter will be set at `100001` (one hundred thousand and one).\n\nTo change the starting value and the tables affected by it, the configuration can be published using\n```sh\nphp artisan vendor:publish\n```\nand then the option which corresponds to `Sausin\\DBSetAutoIncrement\\AutoIncrementServiceProvider` needs to be selected. This will add a config named `auto-increment.php` in your project's config folder.\n\nChange the values as desired.\n\n# Usage\n\n## Default Behavior\n\nIt will run every time  migrations are finished running, whether for the first time or incremental. All tables where the `AUTO_INCREMENT` value is higher than the value in the config will be left alone. Changes will be made in all the rest.\n\nIf, however, automatic updation behaviour is not desired, the `action` key in the config file can be changed to `manual` and the package will not take automatic action.\n\n## Command line\n\nUsing the below command\n```sh\nphp artisan db:set-auto-increment --tables=users --value=20001\n```\nthe auto increment value can be changed manually. Multiple tables are accepted as input.\n\n# Supported SQL Drivers\n\nCurrently `mysql` and `sqlite` are supported. Plan to have support for more drivers in future. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsausin%2Flaravel-set-autoincrement","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsausin%2Flaravel-set-autoincrement","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsausin%2Flaravel-set-autoincrement/lists"}