Download the PHP package bakkahit/sql-migration without Composer

On this page you can find all versions of the php package bakkahit/sql-migration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sql-migration

SqlMigration Package

SqlMigration is a Laravel package designed for executing custom SQL migrations seamlessly within your Laravel application. This package bridges the gap between Laravel's migrations and raw SQL execution, allowing you to write powerful SQL commands directly in your migration files.

Why Use SqlMigration?

When working with complex database operations, Laravel's schema builder may not suffice. SqlMigration empowers developers to:

Features

Installation

Install the package in your Laravel project with:

Open the config/app.php file in your Laravel project and add the SqlMigrationServiceProvider class to the list of providers, like this

Usage

Step 1: Create a SQL Migration File

You can create a new SQL migration file by using the following Artisan command:

This command will generate a migration file inside the database/migrations directory, with a name following this format: YYYY_MM_DD_HHMMSS_create_test_table_sql.php. The create_test_table_sql part of the file name is the name you provide when running the command, and it will be used in the generated migration class as well.

Step 2: Write SQL Queries in the Migration File

Once the migration file is created, you will see a class with up() and down() methods. You can define your SQL queries inside the up() method to apply changes to the database, and in the down() method to reverse them.

Example of a migration file with raw SQL to create a table:

In this example:

Step 3: Run Migrations

After writing the SQL commands in your migration file, you can run the migrations as usual using the following Artisan command:

This will execute all pending migrations, including the SQL-based migrations.

Step 4: Rollback Migrations (Optional)

If you want to rollback the most recent migrations (including the SQL migrations), you can use the following command:

This will call the down() method in each migration, reversing any changes made in the up() method.

Notes

Requirements

Contributing

We welcome contributions to the package! If you'd like to improve the package, fix bugs, or add new features, feel free to fork the repository and submit a pull request.

License

The SqlMigration package is open-source software licensed under the MIT License.


All versions of sql-migration with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bakkahit/sql-migration contains the following files

Loading the files please wait ....