LLMS_REST_Install::get_schema( string $schema, string $collate )
Adds REST API Keys table to the LifterLMS DB Table Schema
Description Description
See also See also
Parameters Parameters
- $schema
-
(string) (Required) String of DB table creation statements.
- $collate
-
(string) (Required) Collation string.
Return Return
(string)
Source Source
File: libraries/lifterlms-rest/includes/class-llms-rest-install.php
public static function get_schema( $schema, $collate ) { global $wpdb; $schema .= " CREATE TABLE `{$wpdb->prefix}lifterlms_api_keys` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint(20) unsigned NOT NULL, `description` varchar(200) DEFAULT NULL, `permissions` varchar(10) NOT NULL, `consumer_key` char(64) NOT NULL, `consumer_secret` char(43) NOT NULL, `truncated_key` char(7) NOT NULL, `last_access` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `consumer_key` (`consumer_key`), KEY `consumer_secret` (`consumer_secret`) ) $collate; CREATE TABLE `{$wpdb->prefix}lifterlms_webhooks` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `status` varchar(20) NOT NULL, `name` text NOT NULL, `user_id` bigint(20) unsigned NOT NULL, `delivery_url` text NOT NULL, `secret` text NOT NULL, `topic` varchar(255) NOT NULL, `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `failure_count` smallint(3) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `user_id` (`user_id`) ) $collate; "; return $schema; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.17 | Remove unused 'pending_delivery' column. |
1.0.0-beta.1 | Introduced. |