#18 - membership

This commit was merged in pull request #23.
This commit is contained in:
Martin Slachta
2026-06-17 11:15:09 +02:00
parent df5f9b1df4
commit c754e18a82
25 changed files with 885 additions and 35 deletions
+20
View File
@@ -93,6 +93,26 @@ class RsvInstaller {
ON DELETE CASCADE
) $charset_collate;");
self::run("CREATE TABLE IF NOT EXISTS {$wpdb->prefix}rsv_membership_program (
id bigint unsigned NOT NULL AUTO_INCREMENT,
name TINYTEXT NOT NULL,
active BOOLEAN NOT NULL DEFAULT TRUE,
PRIMARY KEY (id)
) $charset_collate;");
self::run("CREATE TABLE IF NOT EXISTS {$wpdb->prefix}rsv_membership_key (
id bigint unsigned NOT NULL AUTO_INCREMENT,
program_id bigint unsigned NOT NULL,
key_value VARCHAR(191) NOT NULL,
key_normalized_value VARCHAR(191) NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY uniq_program_key (program_id, key_normalized_value),
KEY idx_key_value (key_normalized_value),
CONSTRAINT fk_member_key_program
FOREIGN KEY (program_id) REFERENCES {$wpdb->prefix}rsv_membership_program (id)
ON DELETE CASCADE
) $charset_collate;");
// Grant the custom capability that gates the admin REST endpoints.
RsvCapabilities::ensure();
}