camper/deploy/payment_redsys_response.sql

31 lines
909 B
PL/PgSQL

-- Deploy camper:payment_redsys_response to pg
-- requires: roles
-- requires: schema_camper
-- requires: payment
-- requires: currency_code
begin;
set search_path to camper, public;
create table payment_redsys_response (
payment_id integer primary key references payment,
response_code integer not null,
date_time timestamp without time zone not null,
secure_payment boolean not null,
transaction_type integer not null,
amount integer not null,
currency_code currency_code not null references currency,
order_number text not null,
authorization_code text not null,
merchant_code text not null,
terminal_number integer not null,
error_code text not null
);
grant select, insert, update on table payment_redsys_response to guest;
grant select, insert, update on table payment_redsys_response to employee;
grant select, insert, update, delete on table payment_redsys_response to admin;
commit;