-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnexmo_sms_response.sql
More file actions
28 lines (27 loc) · 861 Bytes
/
nexmo_sms_response.sql
File metadata and controls
28 lines (27 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- Table definition
create sequence nexmo_sms_response_seq;
create table nexmo_sms_response (
response_pk number not null primary key,
status varchar2(255),
message_id varchar2(255),
message_to varchar2(255),
message_text varchar2(1000),
client_ref varchar2(255),
remaining_balance number,
message_price number,
message_network varchar2(255),
error_text varchar2(1000),
code varchar2(20),
ip_address varchar2(20),
purpose varchar2(20),
created_timestamp timestamp
);
create or replace editionable trigger nexmo_sms_response_trig
before insert or update on nexmo_sms_response for each row
begin
if inserting then
:new.response_pk := nexmo_sms_response_seq.NEXTVAL;
:new.created_timestamp :=CURRENT_TIMESTAMP;
end if;
end nexmo_sms_response_trig;
/