PostgreSQL Database Tables

In this video series you can see how to connect Ozeki SMS Gateway to a PostgreSQL database server for SMS messaging. This video shows how to create the proper database table structure by using the GUI of your PostgreSQL database server.

Video content
1. Connect to PostgreSQL
2. Create User in PostgreSQL
3. Copy CREATE TABLE statements

Please scroll downto copy the SQL statements (Figure 2-3) used in the video. If you have created the database in PostgreSQL, you can jump to the next video.

connect to the postgresql server by using the pgadmin software
Figure 1 - Connect to the PostgreSQL server by using the PgAdmin software

CREATE TABLE statements to use on your PostgreSQL server


CREATE TABLE ozekimessagein
(
id serial,
sender varchar(255),
receiver varchar(255),
msg varchar(160),
senttime varchar(100),
receivedtime varchar(100),
operator varchar(100),
msgtype varchar(160),
reference varchar(100)
);

CREATE TABLE ozekimessageout
id serial,
sender varchar(255),
receiver varchar(255),
msg varchar(160),
senttime varchar(100),
receivedtime varchar(100),
reference varchar(100),
status varchar(20),
operator varchar(100),
errormsg varchar(250),
>msgtype varchar(160));
Figure 2 - Copy CREATE TABLE statements

copy create table statements from figure 2
Figure 3 - Copy CREATE TABLE statements from Figure 2

paste create table statements and run them on postgresql
Figure 4 - Paste CREATE TABLE statements and run them on the PostgreSQL database server

More information