2017 © Pedro Peláez
 

library dot-migrations

A package made for DotKernel 3 to introduce migrations and seeders

image

japseyz/dot-migrations

A package made for DotKernel 3 to introduce migrations and seeders

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 13 Versions
  • 7 % Grown

The README.md

dot-migrations

Add migrations and seeders to your DotKernel3 project., (*1)

Usage

Some new commands as been added to the php dot command., (*2)

  • make:migration **name** [path]
    • Make a migration file, which will be used to create new tables and rows in the database
    • The path is used to pre-fill the namespace, and has to match a path in the config file.
    • data/database/migrations is the default path if none are supplied
  • make:seed **name** [path]
    • Make a seeder, which will be used to seed the database with data.
    • The path is optional and will default to data/database/seeds.
    • When supplying your own path, it must match a path from the config file.
  • migrate [--force|-f]
    • Migrate the missing migrations, use the --force in your deployment script to avoid the production environment warning.
  • migrate:reset [--force|-f] [--hard|-h]
    • Rollback all migrations and reset the database.
    • Supplying --force will prevent the environment warning in production.
    • Supplying the --hard flag will drop and re-create the entire schema.
  • migrate:rollback
    • Rollback a single batch of migrations only.
  • migrate:seed [path] [--force|-f]
    • Run all seeders, or optionally provide a path to a specific seeder to run.
    • If a path is provided, please escape it with double-quotes like "Data\Database\Seeder\UserTableSeeder"
    • Supplying the --force flag will prevent the environment warning in production.
  • migrate:god
    • The God command is intended for development and will recreate the schema, re-migrate and re-seed the database.

To run any of them simply run php dot <command>. DotKernel will take care of the rest, putting the files in the correct directories etc. Settings can be found in the migrations.php.dist., (*3)

Installation

1) Installing is extremely easy, all you have to do is run composer require japseyz/dot-migrations, and copy the migrations.php.dist file to the /config folder and remove the .dist ending., (*4)

2) After that is done, you open up /config/config.php and add \Dot\Migrations\ConfigProvider::class, to the $aggregator array., (*5)

3) Create a folder inside data named database, and inside this, create two folders; migrations and seeds, this is where your migrations and seeds will go., (*6)

4) That's it, all you have to do now is run composer dump-autoload and enjoy access to migrations and seeders, all you have to do is run php dot, (*7)

Troubleshooting

The migration commands does not show up, what do I do?

If you've follow the installation, but no commands show up, try deleting /data/config-cache.php and running php dot again., (*8)

The Versions

03/11 2017

dev-master

9999999-dev

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires

03/11 2017

dev-dev

dev-dev

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires

12/10 2017

v0.1.10

0.1.10.0

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires

10/10 2017

v0.1.9

0.1.9.0

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires

10/10 2017

V0.1.8

0.1.8.0

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires

09/10 2017

v0.1.7

0.1.7.0

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires

09/10 2017

v0.1.6

0.1.6.0

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires

12/09 2017

v0.1.5

0.1.5.0

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires

12/09 2017

v0.1.4

0.1.4.0

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires

05/09 2017

v0.1.3

0.1.3.0

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires

25/08 2017

v0.1.2

0.1.2.0

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires

22/08 2017

v0.1.0

0.1.0.0

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires

22/08 2017

v0.1.1

0.1.1.0

A package made for DotKernel 3 to introduce migrations and seeders

  Sources   Download

MIT

The Requires

 

The Development Requires