Official blog official blog

Sunday, June 16, 2013

DELT's database

Different kinds of databases are supported, since DELT is based on PDO, which is a DBMS abstraction layer. That said, I only used MySQL for my tests, so there could be problems I am not aware of if you use something else.

To setup the database, you can use the file protected/data/schema.mysql.sql, through the interface you like best (command line, phpMyAdmin, whatever...). The file contains the instructions to create the needed tables, and to insert a user, name 'admin' and password 'admin' in the users table.

Also, you should copy the files protected/config/main.php-dist and protected/config/console.php-dist to protected/config/main.php and protected/config/console.php, respectively.
In the file protected/config/main.php you will find the following lines:

  'connectionString' => 'mysql:host=localhost;dbname=delt',
  'emulatePrepare' => true,
  'username' => 'delt',
  'password' => 'secretpassword',
  'charset' => 'utf8',
  'tablePrefix' => 'tbl_',

Edit the connection string, the username, the password and, if needed, the tablePrefix.

No comments:

Post a Comment