PHPackages                             windwalker/rad-development-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. windwalker/rad-development-bundle

ActiveLibrary[Database &amp; ORM](/categories/database)

windwalker/rad-development-bundle
=================================

Development Bundle includes Seeders and Sql sync tools.

1.0.5(9y ago)0481[2 issues](https://github.com/ventoviro/rad-development-bundle/issues)GNU Lesser General Public LicensePHP

Since Apr 1Pushed 7y ago2 watchersCompare

[ Source](https://github.com/ventoviro/rad-development-bundle)[ Packagist](https://packagist.org/packages/windwalker/rad-development-bundle)[ RSS](/packages/windwalker-rad-development-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (1)Versions (7)Used By (0)

Windwalker Joomla RAD Development Bundle
========================================

[](#windwalker-joomla-rad-development-bundle)

Some helpful command line tools to operate database for development.

Table of Content
----------------

[](#table-of-content)

- [Sqlsync](#sql-sync)
- [Seeder](#seeder)

Installation via Composer
-------------------------

[](#installation-via-composer)

```
cd /to/your/joomla

composer create-project windwalker/rad-development-bundle libraries/windwalker-bundles/DevelopmentBundle 1.*
```

Commands
--------

[](#commands)

```
Windwalker Console - version: 2.1
------------------------------------------------------------

# system commands ...

  seed         The data seeder help you create fake data.
    import       Import seeders.
    clear        Clear seeders.

  sql          SQL sync & diff tools.
    backup       Backup sql.
    col          Column operation
    export       Export sql.
    import       Import a sql file.
    profile      Profiles.
    restore      Restore to pervious point.
    table        Model operation.
```

SQL Sync
--------

[](#sql-sync)

Windwalker Sqlsync is a powerful SQL compare &amp; diff tools help developers update their SQL schema.

### Why Not Migration Tools?

[](#why-not-migration-tools)

Actually, we are developing a migration tools for Joomla &amp; Windwalker now, but migration is not so suitable for Joomla CMS, sometimes we will want to sync Joomla articles, modules, extensions and menus to your production server. Migration tools are hard to do this.

So, using Sqlsync tools will help you compare sql schema between your local &amp; remote machine, simply run `export` in your local, and git track all schema YAML files. Then push your files to remote server and run `import`, all schemas will update to remote.

> Currently Sqlsync are weak on column name change, you can use hooks to do this.

### Export &amp; Import SQL Schema

[](#export--import-sql-schema)

```
php bin/windwalker sql export

php bin/windwalker sql import
```

Scheam will export to `resources/sqlsync/default/schema.yml`

### Track Tables

[](#track-tables)

Table track information stores in `resources/sqlsync/default/track.yml`

Default is:

```
table:
    '#__assets': all
    '#__associations': all
    '#__banner_clients': all
    '#__banner_tracks': all
    '#__banners': all
    '#__categories': all
    '#__contact_details': all
    '#__content': all
    '#__content_frontpage': all
    '#__content_rating': all
    '#__content_types': all
    '#__contentitem_tag_map': all
    '#__core_log_searches': all
    '#__extensions': all
    '#__finder_filters': cols
    '#__finder_links': cols
    '#__finder_links_terms0': cols
    '#__finder_links_terms1': cols
    '#__finder_links_terms2': cols
    '#__finder_links_terms3': cols
    '#__finder_links_terms4': cols
    '#__finder_links_terms5': cols
    '#__finder_links_terms6': cols
    '#__finder_links_terms7': cols
    '#__finder_links_terms8': cols
    '#__finder_links_terms9': cols
    '#__finder_links_termsa': cols
    '#__finder_links_termsb': cols
    '#__finder_links_termsc': cols
    '#__finder_links_termsd': cols
    '#__finder_links_termse': cols
    '#__finder_links_termsf': cols
    '#__finder_taxonomy': cols
    '#__finder_taxonomy_map': cols
    '#__finder_terms': cols
    '#__finder_terms_common': all
    '#__finder_tokens': cols
    '#__finder_tokens_aggregate': cols
    '#__finder_types': cols
    '#__languages': all
    '#__menu': all
    '#__menu_types': all
    '#__messages': all
    '#__messages_cfg': all
    '#__modules': all
    '#__modules_menu': all
    '#__newsfeeds': all
    '#__overrider': all
    '#__postinstall_messages': all
    '#__redirect_links': all
    '#__schemas': all
    '#__session': cols
    '#__tags': all
    '#__template_styles': all
    '#__ucm_base': all
    '#__ucm_content': all
    '#__ucm_history': all
    '#__update_sites': all
    '#__update_sites_extensions': all
    '#__updates': cols
    '#__user_keys': all
    '#__user_notes': all
    '#__user_profiles': all
    '#__user_usergroup_map': all
    '#__usergroups': all
    '#__users': all
    '#__utf8_conversion': all
    '#__viewlevels': all
```

There are 3 track rules:

- `all` - Track all data, always refresh data when import &amp; export.
- `cols` - Only track table columns, do not refresh data.
- `none` - Ignore this table

> All table which not list in track.yml will be `none`.

### Sync Track Tables

[](#sync-track-tables)

If you installed a new component, there may be multiple tables added to ypur database, you can run:

```
php bin/windwalker sql table sync
```

To auto add all non-tracked table to `track.yml`

### Status

[](#status)

This command help you check table track information.

```
php bin/windwalker sql status
```

[![p-2016-04-05-006](https://cloud.githubusercontent.com/assets/1639206/14274758/d143e078-fb45-11e5-9e53-c5967f94a5a9.jpg)](https://cloud.githubusercontent.com/assets/1639206/14274758/d143e078-fb45-11e5-9e53-c5967f94a5a9.jpg)

### Profiles

[](#profiles)

You can change profile by use

```
# List profile
php bin/windwalker sql profile

# Create & checkout profile
php bin/windwalker sql profile create test
php bin/windwalker sql profile checkout test
```

Now you can export schema to other profile, this is very similar to git branches.

### Quick import &amp; export to profile

[](#quick-import--export-to-profile)

You don't need to always checkout profiles, add profiles as arguments in commands.

```
# Single profile
php bin/windwalker sql export test

# Multiple profiles
php bin/windwalker sql export default foo bar test

# Ignore checking prompt
php bin/windwalker sql export default foo bar test -y

# Export all profiles
php bin/windwalker sql export --all -y
```

This operations can support `export` / `import` both commands.

### Rename Column

[](#rename-column)

Modify `From` property in your schema files.

```
columns:
  oldname: { Field: newname, ... , From: [oldname, oldname2] }
```

All oldnames in `From` property will convert to `newname`

> Currently Sqlsync are weak on column name change, try avoid to do this operation.

### Export &amp; Import Hooks

[](#export--import-hooks)

Add these files to profile folder.

```
pre-export.php
post-export.php
pre-import.php
post-import.php
```

And simply write your script to do something.

```
// resources/sqlsync/default/pre-import.php

if (!JFactory::getConfig()->get('debug'))
{
    throw new \Exception('STOP importing, please enable debug mode to do any DB operations.');
}

// Or do some advanced DB actions, for instance, rename column or remove indexes.
JFactory::getDbo()->setQuery('ALTER TABLE ...')->execute();
```

Seeder
------

[](#seeder)

Windwalker Developement Bundle provides a simple seeder and faker tools to help you generate fake data.

Open `resources/seeders/DatabaseSeeder.php`, you will see `DatabaseSeeder` default class:

Add a new seeder class at `resources/seeders/ProductSeeder.php`

```
use Faker\Factory;
use Windwalker\Data\Data;
use Windwalker\DataMapper\DataMapper;

class ProductSeeder extends \DevelopmentBundle\Seeder\AbstractSeeder
{
	public function doExecute()
	{
		$faker = Factory::create();
		$mapper = new DataMapper('#__mycomponent_products');
		$categories = (new DataMapper('#__categories'))->findColumn('id', ['extension' => 'com_mycomponent']);
		$userIds = (new DataMapper('#__users'))->id;

		foreach (range(1, 200) as $i)
		{
			$data = new Data;

			$user_id = JFactory::getUser()->id;

			$data['catid']        = $faker->randomElement($categories);
			$data['title']        = $faker->sentence(rand(3, 5));
			$data['alias']        = JFilterOutput::stringURLSafe($data['title']);
			$data['temperature']  = $faker->randomElement(['normal', 'refrigeration', 'freeze']);
			$data['price']        = rand(5000, 10000)/100;
			$data['location']     = $faker->country;
			$data['description']  = $faker->paragraph(5);
			$data['image']        = $faker->imageUrl();
			$data['state']        = $faker->randomElement([1, 1, 1, 1, 1, 0]);
			$data['created']      = $faker->dateTimeThisMonth->format('Y-m-d H:i:s');
			$data['created_by']   = $faker->randomElement($userIds);
			$data['modified']     = $faker->dateTimeThisMonth->format('Y-m-d H:i:s');
			$data['modified_by']  = $faker->randomElement($userIds);
			$data['params']       = '';

			$mapper->createOne($data);

			$this->command->out('.', false);
		}

		$this->command->out();
	}

	public function doClear()
	{
		$this->truncate('#__mycomponent_products');
	}
}
```

And set this class to `DatabaseSeeder`, you must sort seeders by denpendencies.

```
// ...

	public function doExecute()
	{
		$this->execute(new CategorySeeder);

		$this->execute(new ProductSeeder);

		$this->execute(new OrderSeeder);
	}

	public function doClear()
	{
		$this->clear(new CategorySeeder);

		$this->clear(new ProductSeeder);

		$this->clear(new OrderSeeder);
	}
```

Now run seeder by:

```
php bin/windwalker seed import
```

Or clear it

```
php bin/windwalker seed export
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 93.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~78 days

Recently: every ~97 days

Total

6

Last Release

3303d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1639206?v=4)[Simon Asika](/maintainers/asika32764)[@asika32764](https://github.com/asika32764)

---

Top Contributors

[![asika32764](https://avatars.githubusercontent.com/u/1639206?v=4)](https://github.com/asika32764 "asika32764 (28 commits)")[![supergud](https://avatars.githubusercontent.com/u/3166468?v=4)](https://github.com/supergud "supergud (2 commits)")

### Embed Badge

![Health badge](/badges/windwalker-rad-development-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/windwalker-rad-development-bundle/health.svg)](https://phpackages.com/packages/windwalker-rad-development-bundle)
```

###  Alternatives

[tiny-pixel/acorn-db

Eloquent database support for Acorn projects

388.7k](/packages/tiny-pixel-acorn-db)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
