8 use Phinx\Migration\AbstractMigration;
16 public function up() {
19 $exists = $this->hasTable(
"cucorerequests");
23 CREATE TABLE cucorerequests ( 26 appliance_ip character varying(100), 27 accountnumber character(12), 28 request_type character varying(20), 29 request_url character varying, 30 request_start timestamp without time zone, 31 request_end timestamp without time zone, 32 request_elapsed integer, 33 request_status character varying, 34 remote_ip character(15) 36 $sqlRs = $this->query($sql);
39 $sql =
"COMMENT ON TABLE cucorerequests IS 'Store status info of the requests made to a live credit union core.';";
40 $sqlRs = $this->query($sql);
42 $sql =
"COMMENT ON COLUMN cucorerequests.cu IS 'The Credit Union Code.';";
43 $sqlRs = $this->query($sql);
45 $sql =
"COMMENT ON COLUMN cucorerequests.appliance_ip IS 'The target appliance ip or dns name.';";
46 $sqlRs = $this->query($sql);
48 $sql =
"COMMENT ON COLUMN cucorerequests.accountnumber IS 'Associated member accountnumber.';";
49 $sqlRs = $this->query($sql);
51 $sql =
"COMMENT ON COLUMN cucorerequests.request_type IS 'Type of core request made.';";
52 $sqlRs = $this->query($sql);
54 $sql =
"COMMENT ON COLUMN cucorerequests.request_url IS 'Request URL to core vendor appliance.';";
55 $sqlRs = $this->query($sql);
57 $sql =
"COMMENT ON COLUMN cucorerequests.request_start IS 'Request start timestamp.';";
58 $sqlRs = $this->query($sql);
60 $sql =
"COMMENT ON COLUMN cucorerequests.request_end IS 'Request end timestamp.';";
61 $sqlRs = $this->query($sql);
63 $sql =
"COMMENT ON COLUMN cucorerequests.request_elapsed IS 'Duration of request in seconds.';";
64 $sqlRs = $this->query($sql);
66 $sql =
"COMMENT ON COLUMN cucorerequests.request_status IS 'Status composed as a JSON string.';";
67 $sqlRs = $this->query($sql);
69 $sql =
"COMMENT ON COLUMN cucorerequests.remote_ip IS 'Remote IP Address.';";
70 $sqlRs = $this->query($sql);
74 CREATE SEQUENCE cucorerequests_id_seq 80 $sqlRs = $this->query($sql);
83 $sql =
"ALTER SEQUENCE cucorerequests_id_seq OWNED BY cucorerequests.id;";
84 $sqlRs = $this->query($sql);
86 $sql =
"ALTER TABLE ONLY cucorerequests ALTER COLUMN id SET DEFAULT nextval('cucorerequests_id_seq'::regclass);";
87 $sqlRs = $this->query($sql);
90 $sql =
"ALTER TABLE ONLY cucorerequests ADD CONSTRAINT pk_cucorerequests PRIMARY KEY (id);";
91 $sqlRs = $this->query($sql);
101 public function down() {
103 $this->dropTable(
"cucorerequests");