Open Source Training Seminar FreePBX Paid Support

Ticket #1775 (closed Bugs: fixed)

Opened 1 year ago

Last modified 1 year ago

miscapps module does not install it's tables on sqlite

Reported by: diego_iastrubni Assigned to: diego_iastrubni
Priority: minor Milestone: 2.3
Component: Other Module Version: 2.3-branch
Keywords: sqlite3 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 miscapps (
        miscapps_id INTEGER NOT NULL PRIMARY KEY $autoincrement,
        ext VARCHAR( 50 ) ,
        description VARCHAR( 50 ) ,
        dest VARCHAR( 255 )
)";


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

?>

and the uninstall.sql should be (check if the table exists):

DROP TABLE IF EXISTS miscapps;

Change History

02/12/07 21:08:24 changed by diego_iastrubni

  • description changed.

02/13/07 22:29:22 changed by diego_iastrubni

  • description changed.

fixed the proposed text

02/13/07 22:29:43 changed by diego_iastrubni

  • description changed.

06/25/07 05:06:56 changed by p_lindheimer

  • version changed from 2.2.1 to 2.3-branch.

06/27/07 03:13:07 changed by diego_iastrubni

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

fixed by changeset:4245, which also added uninstall.sql and published by changeset:4246

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads