Download the PHP package en0ma/rumble without Composer
On this page you can find all versions of the php package en0ma/rumble. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package rumble
Rumble
A php migration tool for AWS dynamoDB.
Requirements
To use for migration and seeding, you should either have aws dymanodb locally installed or have a valid aws credential for the remote version in a particular aws region.
Disclosure
is far from being complete compared to other migration tool out there. More features will be added in the future.
Naming Convention
Since is still in its infancy, it cannot generate migration or seeder file automatically. You have to manually create files for both migrations and seeds. Migration and Seed files are to be placed in and directories at the root of your project.
A migration or seed file must be named with an underscore separating each word that makes up the file name. e.g: , is a valid file name for a migration or a seed file.
While the file name uses underscore naming style, the class name for the file uses PasCal naming style. i.e the first letter of every word that makes up the file name must be capitalized e.g: .
Class Definition
- Migration: Every migration file (class) you create must extend the rumble class and must define a method.
- Seed: Every seed file (class) you create must extend the rumble class and must define a method.
Using Rumble
- Migration: to migrate files, run from the root directory of your project. e.g:
- Seed: to seed files, run from the root directory of your project e.g
Supported DynamoDb Features
Currently, supports only the below dynamodb features;
- Create table
- Update table
- Delete table
- Add Item
- Batch Write Item
Tutorial - Create a new table
The below code sample shows the minimum required params to create a dynamodb table using . This is from the method of the migration file (). The method, is the only required method to be implemented by every migration file you create.
Tutorial - Seed table
The below sample code shows the minimum required params to seed a dynamodb table (sample created above). This is from the method of the seed file (). The method is the only required method to be implemented by every seed file you create
Database Configuration
uses a file as its configuration file. You have to create this file at the root of your project. This file must return an array with your dynamodb configuration. e.g:
<?php
return [
'region' => '',
'key' => '',
'secret' => '',
'endpoint' => ''
];