mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 06:28:52 +00:00
59 lines
2.9 KiB
SQL
59 lines
2.9 KiB
SQL
-- comment this out if your server has a different table/location for phone_number
|
|
-- or if it already exists in the users table
|
|
ALTER TABLE `users` ADD COLUMN `phone_number` VARCHAR(20) NULL DEFAULT NULL;
|
|
|
|
CREATE TABLE IF NOT EXISTS npwd_phone_contacts (
|
|
id int(11) NOT NULL AUTO_INCREMENT,
|
|
identifier varchar(60) DEFAULT NULL,
|
|
number varchar(10) DEFAULT NULL,
|
|
display varchar(60) NOT NULL DEFAULT '',
|
|
PRIMARY KEY (id)
|
|
)
|
|
ENGINE = INNODB,
|
|
AUTO_INCREMENT = 6,
|
|
AVG_ROW_LENGTH = 4096,
|
|
CHARACTER SET utf8mb4,
|
|
COLLATE utf8mb4_general_ci;
|
|
|
|
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('phone', 'Phone', 1, 0, 1);
|
|
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('dphone', 'Destroyed Phone', 1, 0, 1);
|
|
|
|
CREATE TABLE IF NOT EXISTS `npwd_twitter_tweets` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
`likes` int NOT NULL DEFAULT '0',
|
|
`identifier` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`visible` tinyint NOT NULL DEFAULT '1',
|
|
`images` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=190 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `npwd_twitter_profiles` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`profile_name` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
|
|
`identifier` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`avatar_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
`bio` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
`location` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
`job` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
`createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `profile_name_UNIQUE` (`profile_name`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
CREATE TABLE IF NOT EXISTS `npwd_twitter_likes` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`profile_id` int NOT NULL,
|
|
`tweet_id` int NOT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `unique_combination` (`profile_id`,`tweet_id`),
|
|
KEY `profile_idx` (`profile_id`),
|
|
KEY `tweet_idx` (`tweet_id`),
|
|
CONSTRAINT `profile` FOREIGN KEY (`profile_id`) REFERENCES `npwd_twitter_profiles` (`id`),
|
|
CONSTRAINT `tweet` FOREIGN KEY (`tweet_id`) REFERENCES `npwd_twitter_tweets` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
SELECT * FROM es_extended.npwd_twitter_likes; |