Download the PHP package gabrielrcosta1/laravel-schema without Composer
On this page you can find all versions of the php package gabrielrcosta1/laravel-schema. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gabrielrcosta1/laravel-schema
More information about gabrielrcosta1/laravel-schema
Files in gabrielrcosta1/laravel-schema
Package laravel-schema
Short Description Laravel package to generate migrations from a schema.db definition file.
License MIT
Informations about the package laravel-schema
Laravel Schema (Development Preview)
๐งช This package is currently under development. Features, APIs and behavior may change at any time.
Generate Laravel migration files based on a simple DSL (domain-specific language) written in a single file: schema.db
.
๐ฆ Installation
Then run:
๐ What It Does
- Adds Artisan commands:
schema:create
schema:migrate
schema:reset
- Lets you define your database tables in a single DSL file
- Generates Laravel-compatible migration files into
database/migrations
- Tracks schema changes and generates only incremental migrations
- Supports full or table-specific reset
- Lets you run
php artisan migrate
as usual
๐ Usage
1. Generate the schema file
This will create the file:
With default content for:
posts
2. Define your schema (example)
Edit database/schema.db
like this:
3. Generate migration files
This will:
- Parse
schema.db
- Compare with previous schema
- Generate new migrations:
- full table migrations
- incremental
add_
/remove_
migrations
4. Apply the migrations
5. Reset generated migrations
If you want to delete generated migrations and schema cache:
Reset everything:
Reset only one table:
This deletes:
- The migration files related to the selected table(s)
- The schema cache files (.json and .hash)
โ Commands Summary
Command | Description |
---|---|
schema:create |
Create schema.db with default tables |
schema:migrate |
Generate migrations from schema (full or incremental) |
schema:reset |
Delete generated migrations and cache (--all or specific) |
php artisan migrate |
Apply the generated migrations |
โ ๏ธ Status
This package is in development.
Use at your own risk in production environments.
Contributions, ideas, and issues are welcome.
๐ License
MIT โ ยฉ Gabriel R. Costa