Yii module to easily create and modify databases. Instead of entering database credentials into config file, creating database and running sql file, module does that for you via online form.
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
modules/installer
readme.md

readme.md

yii-database-installer

This module provides an easy way to install database. Things you can configure are:

  • database username
  • database password
  • database name
  • sql file to run(either from upload or from data folder in module)
  • database driver

Once you enter this data, script will first create database if it is not already present, save configuration to config file inside module config folder and run the selected sql file.

Requirements

Yii Framework 1.1.14

Installing

Add to protected/config/main.php the following:

'modules' => array(
	'installer' => array(
			'redirectUrl' => 'site/index', // controller action you want to redirect in case installation has been completed
			'allowSqlUpload' => true, // set this to true if you want to manually upload sql file to run. Otherwise script will look in data folder of the module.
	),
),
'db' => require(dirname(__FILE__).'/../modules/installer/config/params.php'),

Usage

Once you have installed the module, go to installer/install on your web browser and fill out the form.