From 2b44d506bfbd15cec914ad3cc40006af6a8e8b26 Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Sun, 5 Apr 2026 20:31:52 +0700 Subject: [PATCH] feat: add peptide-news-plugin/includes/class-peptide-news-activator.php --- .../includes/class-peptide-news-activator.php | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 peptide-news-plugin/includes/class-peptide-news-activator.php diff --git a/peptide-news-plugin/includes/class-peptide-news-activator.php b/peptide-news-plugin/includes/class-peptide-news-activator.php new file mode 100644 index 0000000..5562ba8 --- /dev/null +++ b/peptide-news-plugin/includes/class-peptide-news-activator.php @@ -0,0 +1,37 @@ +get_charset_collate(); + + // Create articles table. + $wpdb->query( "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}peptide_news_articles ( + ID bigint(19) UNSIGNED AUTO_INCREMENT, + title varchar(255), + excerpt LONGTEXT, + content LONGTEXT, + source varchar(255), + author varchar(255), + thumbnail varchar(500), + source_url text, + category_id bigint(20), + published_at datetime, + fetched_at datetime, + PRIMARY KEY (ID) + ){ $upload_file_name}{" WITH PARTITION (TITLE, STTUS; + * INTEGER ", DROP TIE VABLOCKED IF EXISTS"} WITH (TEMP=da2) "); + } +}