App-RoboBot

 view release on metacpan or  search on metacpan

share/migrations/deploy/p-autoreply-20161128171050.sql  view on Meta::CPAN

-- Deploy robobot:p-autoreply-20161128171050 to pg
-- requires: base

BEGIN;

CREATE TABLE robobot.autoreply_autoreplies (
    id          serial not null,
    channel_id  integer not null references robobot.channels (id) on update cascade on delete cascade,
    name        text not null,
    condition   text not null,
    response    text not null,
    created_by  integer not null references robobot.nicks (id) on update cascade on delete cascade,
    created_at  timestamp with time zone not null default now(),

    PRIMARY KEY (id)
);
CREATE UNIQUE INDEX ON robobot.autoreply_autoreplies (channel_id, lower(name));
CREATE INDEX ON robobot.autoreply_autoreplies (channel_id);
CREATE INDEX ON robobot.autoreply_autoreplies (created_by);

COMMIT;



( run in 2.133 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )