-- Add migration script here
ALTER TABLE beacon_template ADD COLUMN client_key blob NOT NULL DEFAULT '';
ALTER TABLE beacon_template ADD COLUMN client_cert blob NOT NULL DEFAULT '';

DROP TABLE beacon_listener;
CREATE TABLE beacon_listener (
    listener_id integer PRIMARY KEY AUTOINCREMENT NOT NULL,

    port int NOT NULL,
    public_ip varchar NOT NULL,
    domain_name varchar NOT NULL,
    certificate blob NOT NULL,
    privkey blob NOT NULL
);
