CREATE TABLE ipset_list ( id SERIAL PRIMARY KEY, name VARCHAR(64) NOT NULL UNIQUE, description VARCHAR(255), created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP);
CREATE TABLE ipset_members ( id BIGSERIAL PRIMARY KEY, ipset_id INTEGER NOT NULL, ip INET NOT NULL, description VARCHAR(255), created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, UNIQUE (ipset_id, ip));
CREATE INDEX idx_ipset_members_ip ON ipset_members USING BTREE (ip inet_ops);
ALTER TABLE filter_list ADD COLUMN ipset_id INTEGER DEFAULT NULL;
