This commit is contained in:
mguschin
2026-02-02 20:12:50 +03:00
parent b8f89cd286
commit 6b54303482
11 changed files with 4276 additions and 1 deletions

41
init.sql Normal file
View File

@@ -0,0 +1,41 @@
-- Prosody MySQL Database Initialization Script
USE prosody;
-- Create tables for Prosody storage
CREATE TABLE IF NOT EXISTS `prosody` (
`host` text,
`user` text,
`store` text,
`key` text,
`type` text,
`value` mediumtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `prosody_auth` (
`username` varchar(255) NOT NULL,
`host` varchar(255) NOT NULL,
`password` varchar(255),
`created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`username`, `host`),
INDEX (`host`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `prosody_roster` (
`username` varchar(255) NOT NULL,
`host` varchar(255) NOT NULL,
`jid` varchar(255) NOT NULL,
`name` varchar(255),
`subscription` varchar(10),
`ask` varchar(10),
`created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`username`, `host`, `jid`),
INDEX (`host`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Insert initial admin user
INSERT INTO `prosody_auth` (`username`, `host`, `password`)
VALUES ('mish', 'xmpp.guschin.info', '3X`V');
-- Prosody will handle the rest of the initialization automatically