Open Source Telephony
 help / color / mirror / Atom feed
From: Dario <djdas@djdas.net>
To: ofono@ofono.org
Subject: SQLite History plugin DB Schema
Date: Sun, 04 Apr 2010 17:54:38 +0200	[thread overview]
Message-ID: <4BB8B63E.80406@djdas.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 2270 bytes --]

Hi all,
as promised last week (sorry for the delay) following is the DB schema 
for the SQLite history plug-in, there are 3 tables: one for the infos 
about calls, one for incoming SMSes and one for outgoing ones. I wrote 
some comments in the scripts to clarify fields informations, please feel 
free to comment/correct if you think something could be wrong or better 
handled.
I'm also finishing a first plug-in version, I'll send the patches to the 
current git revision as soon as possible.
Thank you in advance, happy Easter :)
Dario

------------- cut here ------------- cut here ------------- cut here 
------------- cut here -------------

CREATE TABLE "ofono_history_calls" (
    "ohc_modem_path" TEXT, -- Modem path string i.e. "/modem0"
    "ohc_type" INTEGER, -- Call type ( 0 = Call ended, 1 = Call missed )
    "ohc_direction" INTEGER, -- Call direction ( 0 = Mobile Originated, 
1 = Mobile Terminated )
    "ohc_phone_number" TEXT, -- Other party phone number
    "ohc_start_time" TEXT, -- Starting date/time
    "ohc_end_time" TEXT -- Ending date/time
);
CREATE TABLE "ofono_history_incoming_messages" (
    "ohim_modem_path" TEXT, -- Modem path string i.e. "/modem0"
    "ohim_msg_id" INTEGER, -- oFono unique message id number
    "ohim_sender" TEXT, -- Sender phone number
    "ohim_text" TEXT, -- Message text
    "ohim_local_date" TEXT, -- Local sent date/time
    "ohim_remote_date" TEXT -- Remote sent date/time
);
CREATE TABLE "ofono_history_outgoing_messages" (
    "ohom_modem_path" TEXT, -- Modem path string i.e. "/modem0"
    "ohom_msg_id" INTEGER, -- oFono unique message id number
    "ohom_recipient" TEXT, -- Recipient phone number
    "ohom_text" TEXT, -- Message text
    "ohom_creation_date" TEXT, -- Message creation date/time
    "ohom_send_status" INTEGER, -- Sending status ( 0 = Pending, 1 = 
Submitted, 2 = Failed )
    "ohom_status_update_date" TEXT -- Last row update date/time
);
CREATE UNIQUE INDEX "ohim_idx_msg_id" on ofono_history_incoming_messages 
(ohim_msg_id ASC);
CREATE UNIQUE INDEX "ohom_idx_msg_id" on ofono_history_outgoing_messages 
(ohom_msg_id ASC);

------------- cut here ------------- cut here ------------- cut here 
------------- cut here -------------


                 reply	other threads:[~2010-04-04 15:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BB8B63E.80406@djdas.net \
    --to=djdas@djdas.net \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox