From 9d84e7b608a532fdf9d59e7e01768d74c3f60e57 Mon Sep 17 00:00:00 2001 From: Siwoo Jeon Date: Mon, 23 Sep 2024 19:33:40 +0900 Subject: [PATCH] fix: Database type --- package.json | 2 +- scripts/create_table.sql | 55 +++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 8d73010..3a3d872 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "muffinbot", - "version": "3.0.1-cake.r240815b", + "version": "3.1.0-cake.d240923a", "main": "dist/index.js", "private": true, "dependencies": { diff --git a/scripts/create_table.sql b/scripts/create_table.sql index 58c9447..45d9e47 100755 --- a/scripts/create_table.sql +++ b/scripts/create_table.sql @@ -1,31 +1,28 @@ -CREATE TABLE - `statement` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `text` varchar(255) DEFAULT NULL, - `search_text` varchar(255) NOT NULL DEFAULT '', - `conversation` varchar(32) NOT NULL DEFAULT '', - `created_at` datetime DEFAULT current_timestamp(), - `in_response_to` varchar(255) DEFAULT NULL, - `search_in_response_to` varchar(255) NOT NULL DEFAULT '', - `persona` varchar(50) NOT NULL DEFAULT '', - PRIMARY KEY (`id`) - ); +CREATE TABLE `statement` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `text` varchar(255) DEFAULT NOT NULL, + `search_text` varchar(255) NOT NULL DEFAULT '', + `conversation` varchar(32) NOT NULL DEFAULT '', + `created_at` datetime DEFAULT current_timestamp(), + `in_response_to` varchar(255) DEFAULT NULL, + `search_in_response_to` varchar(255) NOT NULL DEFAULT '', + `persona` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +); -CREATE TABLE - `nsfw_content` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `text` varchar(255) NOT NULL DEFAULT '', - `created_at` datetime DEFAULT current_timestamp(), - `persona` varchar(50) NOT NULL DEFAULT '', - PRIMARY KEY (`id`) - ); +CREATE TABLE `nsfw_content` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `text` varchar(255) NOT NULL DEFAULT '', + `created_at` datetime DEFAULT current_timestamp(), + `persona` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +); -CREATE TABLE - `learn` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `command` varchar(255) NOT NULL, - `result` varchar(255) NOT NULL, - `user_id` varchar(255) NOT NULL, - `created_at` datetime NOT NULL DEFAULT current_timestamp(), - primary key(`id`) - ); \ No newline at end of file +CREATE TABLE `learn` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `command` varchar(255) NOT NULL, + `result` varchar(255) NOT NULL, + `user_id` varchar(255) NOT NULL, + `created_at` datetime NOT NULL DEFAULT current_timestamp(), + primary key (`id`) +); \ No newline at end of file