export const GROUPS_TABLE = 'groups';
export const GROUP_MEMBERS_TABLE = 'group_members';

export const CREATE_GROUPS_TABLE = `CREATE TABLE IF NOT EXISTS groups (
  id TEXT PRIMARY KEY NOT NULL,
  data TEXT NOT NULL,
  updatedAt TEXT NOT NULL
)`;

export const CREATE_GROUP_MEMBERS_TABLE = `CREATE TABLE IF NOT EXISTS group_members (
  groupId TEXT NOT NULL,
  userId TEXT NOT NULL,
  data TEXT NOT NULL,
  updatedAt TEXT NOT NULL,
  PRIMARY KEY (groupId, userId)
)`;

export const CREATE_GROUP_INDEXES = [
  `CREATE INDEX IF NOT EXISTS idx_group_members_groupId ON group_members(groupId)`,
];