DROP TABLE IF EXISTS sqlpage_pages;
CREATE TABLE sqlpage_pages
(
    name text PRIMARY KEY
);
INSERT INTO sqlpage_pages
SELECT UNNEST(ARRAY[
  'Products', 'Categories', 'Groups',
  'Tags',
  'Transactions', 'Trend', 'Volume'
]);

DROP TYPE IF EXISTS sqlpage_filter_type;
CREATE TYPE sqlpage_filter_type AS (
  name text,
  label text,
  value text,
  "default" text,
  type text,
  dropdown bool,
  multiple bool,
  formaction text,
  width int
);