Open Source Training Seminar FreePBX Paid Support

Ticket #1784 (closed Feature Requests: fixed)

Opened 2 years ago

Last modified 2 months ago

disa does not install it's DB on sqlite

Reported by: diego_iastrubni Assigned to: diego_iastrubni
Priority: minor Milestone: 2.5
Component: Sqlite3 Version:
Keywords: sqlite Cc:
Confirmation: Unreviewed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

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

Attachments

sqlite3-support.dpatch (2.4 kB) - added by diego_iastrubni on 02/17/07 21:29:59.
fix for this bug
sqlite3-new.patch (3.1 kB) - added by diego_iastrubni on 06/27/07 03:01:09.
new patch for sqlite3 support - problems...?

Change History

02/17/07 21:29:59 changed by diego_iastrubni

  • attachment sqlite3-support.dpatch added.

fix for this bug

06/20/07 06:44:55 changed by p_lindheimer

  • version changed from 2.2.1 to 2.3-branch.

06/27/07 03:00:39 changed by diego_iastrubni

  • owner set to diego_iastrubni.
  • status changed from new to assigned.

found a problem while merging my patch from 2.2 to 2.3: i found that on my patch there is a new table, not available on 2.3:

--- install.sql (revision 4238)
+++ install.sql (working copy)
@@ -1 +1 @@
-CREATE TABLE IF NOT EXISTS disa ( disa_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , displayname VARCHAR( 50 ), pin VARCHAR ( 50 ), cid VARCHAR ( 50 ), context
 VARCHAR ( 50 ), digittimeout INT, resptimeout INT, needconf VARCHAR( 10 ) );

Index: install.php
===================================================================
--- install.php (revision 4238)
+++ install.php (working copy)
@@ -1,12 +1,41 @@
 <?php

 global $db;
+global $amp_conf;

+$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
+
+$sql = "CREATE TABLE IF NOT EXISTS manager (
+       `manager_id` INTEGER NOT NULL  PRIMARY KEY $autoincrement,
+       `name` VARCHAR( 15 ) NOT NULL ,
+       `secret` VARCHAR( 50 ) ,
+       `deny` VARCHAR( 255 ) ,
+       `permit` VARCHAR( 255 ) ,
+       `read` VARCHAR( 50 ) ,
+       `write` VARCHAR( 50 )
+)";
+
+$sql = "CREATE TABLE IF NOT EXISTS disa (
+       disa_id INTEGER NOT NULL PRIMARY KEY $autoincrement,
+       displayname VARCHAR( 50 ),
+       pin VARCHAR ( 50 ),
+       cid VARCHAR ( 50 ),
+       context VARCHAR ( 50 ),
+       digittimeout INTEGER,
+       resptimeout INTEGER,
+       needconf VARCHAR( 10 )
+);";
+
+$check = $db->query($sql);

Should I commit the patch with the new table? or remove it? I am attaching a new patch to this bug.

06/27/07 03:01:09 changed by diego_iastrubni

  • attachment sqlite3-new.patch added.

new patch for sqlite3 support - problems...?

06/30/07 09:45:17 changed by p_lindheimer

  • status changed from assigned to new.
  • component changed from DISA Module to Sqlite3.

07/26/07 08:14:53 changed by p_lindheimer

  • version changed from 2.3-branch to SVN-HEAD.
  • milestone changed from 2.2 to 3.0.

moving to post 2.3 (unless someone wants to get these in soon)

11/27/07 23:32:42 changed by p_lindheimer

  • confirmation set to Unreviewed.
  • version deleted.
  • milestone changed from 2.4 to 3.0.

deferring from lack of progress

06/23/08 20:52:46 changed by p_lindheimer

  • type changed from Bugs to Feature Requests.

07/02/08 15:12:13 changed by lazytt

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

not sure why the patch contained the asterisk agi table stuff, so i skipped that. r5888, r5889

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads