Skip to content

Install Database SQLite

Barry O'Donovan edited this page Feb 17, 2014 · 2 revisions

ViMbAdmin requires a backend database. We use the Doctrine2 DBAL and ORM so, in theory, any of the databases that Doctrine2 DBAL supports should work fine. We tend to use MySQL / MariaDB exclusively for testing and production so these should be considered as fully supported and recommended.

Installing with SQLite - NOT SUPPORTED / DOES NOT WORK - READ IN FULL

Ensure you have the PHP SQLite module:

sudo apt-get install php5-sqlite

We have tested a basic install with some features on SQLite and it failed during setup - see below.

Set your ViMbAdmin application.ini configuration as appropriate:

resources.doctrine2.connection.options.driver   = 'pdo_sqlite'
resources.doctrine2.connection.options.path     = '/tmp/vimbadmin.db'

Issues

While the database can be created successfully, initial setup fails with:

Doctrine\DBAL\Exception\NotNullConstraintViolationException
File /Users/barryo/dev/vimbadmin/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php
Line 142

Message: An exception occurred while executing 

    'INSERT INTO admin (username, password, super, active, created, modified) VALUES (?, ?, ?, ?, ?, ?)' 

with params 

  [
    "[email protected]", 
    "$2a$09$OTB7zR9UgMI0TWd3yaV4CeGkwAQpn6EwqBD4o.OI7Ip1cJXz.Q5UW", 
     1, 1, "2014-02-17 10:26:12", "2014-02-17 10:26:12"
  ]: 

SQLSTATE[23000]: Integrity constraint violation: 19 admin.id may not be NULL

If anybody wants to look at this and open a pull request please do. admin.id is the primary key and set to auto-increment so it should not need to be set.