Author Topic: RoundCube Calendar + SQLite  (Read 7121 times)

Offline der-typ

  • Newbie
  • *
  • Posts: 4
RoundCube Calendar + SQLite
« on: December 02, 2010, 07:45:51 AM »
Hi,

Is it possible to use the calendar (which contains to the myroundcube package combined) with a sqlite database.

I have only found sql scipts for mysql and postgres in the "SQL"-Folder.
So I have tried to convert those scripts in sqlite syntax manually.
Result:

CREATE TABLE 
'events' (
  
'event_id' INTEGER,
  
'uid' TEXT,
  
'recurrence_id' TEXT,
  
'user_id' INTEGER NOT NULL DEFAULT '0',
  
'start' datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  
'end' datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  
'expires' datetime NOT NULL DEFAULT '9999-12-31 23:59:59',
  
'rr' TEXT default NULL,
  
'recurring' TEXT NOT NULL,
  
'occurrences' INTEGER DEFAULT '0',
  
'byday' TEXT,
  
'bymonth' TEXT
  
'bymonthday' TEXT,
  
'summary' TEXT NOT NULL,
  
'description' TEXT NOT NULL,
  
'location' TEXT NOT NULL DEFAULT '',
  
'categories' TEXT NOT NULL DEFAULT '',
  
'all_day' INTEGER NOT NULL DEFAULT '0',
  
'group' TEXT,
  
'timestamp' timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  
'del' INTEGER NOT NULL DEFAULT '0',
  
'notified' INTEGER NOT NULL default '0',
 
PRIMARY KEY ('event_id' ASC),
 
CONSTRAINT 'user_id_fk_events' FOREIGN KEY ('user_id')
   
REFERENCES 'users'('user_id'ON DELETE CASCADE ON UPDATE CASCADE
); 

CREATE INDEX events_user_id ON events (user_iddel);


I was able to run this on my sqlite database und the calendar is available in my roundcube.

But the problem: In the calendar are some example entries not from me.
If i try to select one nothing happens.
If i try to add a new entry the form to create opens but after saving there is no new entry in the calendar.
I can't find something suspicious in roundcubes error logs.

Thanks for help.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,901
    • SKaero - Custom Roundcube development
RoundCube Calendar + SQLite
« Reply #1 on: December 02, 2010, 10:44:50 AM »
I'm not too familiar with SQLite but I think you may have to rewrite the queries to get it to work.

kevinkx7

  • Guest
RoundCube Calendar + SQLite
« Reply #2 on: December 02, 2010, 12:51:46 PM »
Hi...I am also facing the same problem. Can anyone out there help us..?

Download NCIS Free , Watch Mythbusters Online

Offline der-typ

  • Newbie
  • *
  • Posts: 4
RoundCube Calendar + SQLite
« Reply #3 on: December 03, 2010, 01:17:22 AM »
Quote from: skaero;31628
I'm not too familiar with SQLite but I think you may have to rewrite the queries to get it to work.

Maybe you are right but in this case there should be an error in the logs. Or shouldn't.

EDIT:
Found the solution at http://www.roundcubeforum.net/7-third-party-contributions/46-api-based-plugins/6587-roundcube-calendar-plugin-not-working-2.html#post31584.
So the query seems to be right.
« Last Edit: December 03, 2010, 02:47:35 AM by der-typ »