CREATE TABLE school_invite_links (
  id int(11) NOT NULL AUTO_INCREMENT,
  short_code varchar(32) NOT NULL,
  school_id int(11) NOT NULL,
  created_at datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (id),
  UNIQUE KEY uq_school_invite_links_short_code (short_code),
  UNIQUE KEY uq_school_invite_links_school_id (school_id),
  CONSTRAINT fk_school_invite_links_school_id FOREIGN KEY (school_id) REFERENCES schools (id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
