Open Source Training Seminar FreePBX Paid Support

Ticket #1778 (closed Bugs: fixed)

Opened 1 year ago

Last modified 1 year ago

pinsets module does not install it's DB in sqlite3

Reported by: diego_iastrubni Assigned to:
Priority: minor Milestone: 2.2
Component: Pin Sets Module Version: 2.3-branch
Keywords: sqlite Cc:
Confirmation: SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description (Last modified by diego_iastrubni)

The install.sql does not work on sqlite. Same as ticket:1773. The correct code is:

<?php

global $db;
global $amp_conf;

$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";

$sql = "CREATE TABLE IF NOT EXISTS pinsets (
        pinsets_id INTEGER NOT NULL  PRIMARY KEY $autoincrement,
        passwords LONGTEXT, description VARCHAR( 50 ) ,
        addtocdr TINYINT( 1 ) ,
        deptname VARCHAR( 50 ) ,
        used_by VARCHAR( 255 )
);"

$check = $db->query($sql);
if(DB::IsError($check)) {
        die("Can not create `pinsets` table\n");
}

?>

It also needs an unsinstall.php (did not have IF EXISTS)

<?php

sql('DROP TABLE IF EXISTS pinsets');

?>

see also ticket:1770

Change History

02/13/07 22:55:45 changed by diego_iastrubni

  • description changed.
  • component changed from - choose - to Pin Sets Module.
  • priority changed from minor to blocker.
  • owner deleted.
  • milestone changed from 2.3 to 2.2.
  • keywords set to sqlite.

02/18/07 03:14:24 changed by vgster

  • priority changed from blocker to minor.

keep all the sqlite ones at the same level.

06/20/07 11:45:55 changed by p_lindheimer

  • version changed from 2.2.1 to 2.3-branch.

06/27/07 02:33:36 changed by diego_iastrubni

  • status changed from new to closed.
  • resolution set to fixed.

fixed by changeset:4241 and publised by changeset:4242

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads