1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-25 08:38:59 +00:00

add table for accounts bot is learning from

This commit is contained in:
Lynne Megido 2019-09-02 13:31:29 +10:00
parent 556dea9fae
commit 025b56e1b6

View file

@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS `bots` (
FOREIGN KEY (`user_id`) REFERENCES users(id) ON DELETE CASCADE, FOREIGN KEY (`user_id`) REFERENCES users(id) ON DELETE CASCADE,
FOREIGN KEY (`credentials_id`) REFERENCES credentials(id) ON DELETE CASCADE FOREIGN KEY (`credentials_id`) REFERENCES credentials(id) ON DELETE CASCADE
) ENGINE=INNODB; ) ENGINE=INNODB;
CREATE TABLE IF NOT EXISTS `fedi_account` ( CREATE TABLE IF NOT EXISTS `fedi_accounts` (
`handle` VARCHAR(128) PRIMARY KEY, `handle` VARCHAR(128) PRIMARY KEY,
`outbox` VARCHAR(256), `outbox` VARCHAR(256),
`credentials_id` INT NOT NULL, `credentials_id` INT NOT NULL,
@ -42,6 +42,12 @@ CREATE TABLE IF NOT EXISTS `fedi_account` (
`icon_update_time` DATETIME DEFAULT 0, `icon_update_time` DATETIME DEFAULT 0,
FOREIGN KEY (`credentials_id`) REFERENCES credentials(id) ON DELETE CASCADE FOREIGN KEY (`credentials_id`) REFERENCES credentials(id) ON DELETE CASCADE
) ENGINE=INNODB; ) ENGINE=INNODB;
CREATE TABLE IF NOT EXISTS `bot_learned_accounts` (
`bot_id` BINARY(64) NOT NULL,
`fedi_id` VARCHAR(128) NOT NULL,
FOREIGN KEY (`bot_id`) REFERENCES bots(id) ON DELETE CASCADE,
FOREIGN KEY (`fedi_id`) REFERENCES fedi_accounts(handle) ON DELETE CASCADE
) ENGINE=INNODB;
CREATE TABLE IF NOT EXISTS `posts` ( CREATE TABLE IF NOT EXISTS `posts` (
`id` BIGINT AUTO_INCREMENT PRIMARY KEY, `id` BIGINT AUTO_INCREMENT PRIMARY KEY,
`fedi_id` VARCHAR(128), `fedi_id` VARCHAR(128),