buzzingpixel/corbomite-migrations

There is no license information available for the latest version (1.1.1) of this package.

Corbomite migrations

1.1.1 2019-03-03 03:43 UTC

This package is auto-updated.

Last update: 2022-07-29 02:24:29 UTC


README

68747470733a2f2f7472617669732d63692e6f72672f62757a7a696e67706978656c2f636f72626f6d6974652d6d6967726174696f6e732e7376673f6272616e63683d6d6173746572

Part of BuzzingPixel's Corbomite project.

Provides a light wrapper around Phinx to make it available to Corbomite.

Usage

APP_BASE_PATH constant

You can define APP_BASE_PATH as a constant to give Corbomite DB knowledge about the app's base path, otherwise Crobomite DB will try to figure it out automatically.

Environment variables

Required environment variables

  • DB_DATABASE
  • DB_USER
  • DB_PASSWORD

Optional environment variables

  • PHINX_MIGRATION_TABLE (default: migrations)
  • PHINX_ADAPTER (default: mysql)
  • DB_HOST (default: localhost)
  • DB_PORT (default: 3306)
  • DB_CHARSET (default: utf8mb4)
  • DB_COLLATION (default: utf8mb4_general_ci)
  • PHINX_VERSION_ORDER (default: creation)

CLI commands

Once you've composer required into your Corbomite project, there will be some new commands available on the command line.

migrate/create-sample-config

Creates a phinx.php config file with sample values at the root of your project.

migrate/create

Creates a migration file in the directory specified in your phinx.php config file.

You can also provide an argument to name the migration and skip the question asking what the name of the migration should be.

migrate/status

Shows the status of migrations.

migrate/up

Runs any migrations that have not yet been run.

migrate/down

Rolls back the previous migration or to the specified target.

seed/create

Creates a seeder class.

You can also provide an argument to name the seeder class and skip the question asking what the name of the seeder should be.

seed/run

Runs seeders. If no argument is provided, all seeders will be run. Provide the class name to run a single seeder

License

Copyright 2019 BuzzingPixel, LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.