Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Schema #1

Open
ghost opened this issue Apr 3, 2014 · 9 comments
Open

SQL Schema #1

ghost opened this issue Apr 3, 2014 · 9 comments

Comments

@ghost
Copy link

ghost commented Apr 3, 2014

I know this project is probably dead as it was last updated 4 years ago, but is there an sql schema for it?
I'm rather interested in using this.

@grawity
Copy link
Contributor

grawity commented Apr 3, 2014

Nope, this repo is the only thing that's left – I can't even find any PHPServ data in the MySQL dumps I still have; I think it all vanished when the server hosting PHPServ finally died. (Which might have been four or even five years ago, or something like that.)

Also: dear gods are you serious about trying to run this ._.

@ghost
Copy link
Author

ghost commented Apr 3, 2014

Yes. Deadly serious - but I am going to attempt to clean it up and strip out parts not needed.

Guess I'll have to go through all the code and build the schema that way :(

@sarahhodne
Copy link

If you do get this working, please do send a Pull Request. While we don't really use this anymore (we've switched to atheme), it would be cool to have this a bit more up to date.

@NaomiAmethyst
Copy link
Member

I might have an old backup of the database. I can't guarantee that the schema will match the code version here, though.

@grawity
Copy link
Contributor

grawity commented Apr 3, 2014

Old backups are always awesome

@NaomiAmethyst
Copy link
Member

I never delete anything. Unfortunately, the latest schema actually died in a hard drive crash. This is the latest backup I found, though. From 2008-01-19.

-- MySQL dump 10.11
--
-- Host: localhost    Database: phpserv
-- ------------------------------------------------------
-- Server version       5.0.32-Debian_7etch3-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `access`
--

DROP TABLE IF EXISTS `access`;
CREATE TABLE `access` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `level` int(10) unsigned NOT NULL default '0',
  `user` varchar(45) NOT NULL default '',
  `pass` varchar(45) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=latin1;

--
-- Table structure for table `botserv_acc`
--

DROP TABLE IF EXISTS `botserv_acc`;
CREATE TABLE `botserv_acc` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `botid` int(10) unsigned NOT NULL,
  `uid` int(10) unsigned NOT NULL,
  `level` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=latin1;

--
-- Table structure for table `botserv_bots`
--

DROP TABLE IF EXISTS `botserv_bots`;
CREATE TABLE `botserv_bots` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `nick` varchar(45) NOT NULL,
  `ident` varchar(45) NOT NULL,
  `host` varchar(45) NOT NULL,
  `ownerid` int(10) unsigned NOT NULL,
  `channel` varchar(45) NOT NULL,
  `trig` varchar(1) NOT NULL default '.',
  PRIMARY KEY  (`id`),
  KEY `Index_2` (`channel`,`id`),
  KEY `Index_3` (`nick`,`id`)
) ENGINE=MyISAM AUTO_INCREMENT=23 DEFAULT CHARSET=latin1;

--
-- Table structure for table `botserv_cmds`
--

DROP TABLE IF EXISTS `botserv_cmds`;
CREATE TABLE `botserv_cmds` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `botid` int(10) unsigned NOT NULL,
  `cmd` varchar(45) NOT NULL,
  `data` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=558 DEFAULT CHARSET=latin1;

--
-- Table structure for table `botserv_cmdtpls`
--

DROP TABLE IF EXISTS `botserv_cmdtpls`;
CREATE TABLE `botserv_cmdtpls` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `cmd` varchar(45) NOT NULL,
  `data` varchar(500) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;

--
-- Table structure for table `botserv_cos`
--

DROP TABLE IF EXISTS `botserv_cos`;
CREATE TABLE `botserv_cos` (
  `botid` int(10) unsigned NOT NULL,
  `uid` int(10) unsigned NOT NULL,
  `id` int(10) unsigned NOT NULL auto_increment,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=latin1 COMMENT='BotServ CoOwners';

--
-- Table structure for table `channels`
--

DROP TABLE IF EXISTS `channels`;
CREATE TABLE `channels` (
  `chanid` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(45) NOT NULL default '',
  `topic` text,
  `modes` varchar(45) default NULL,
  PRIMARY KEY  (`chanid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `modules`
--

DROP TABLE IF EXISTS `modules`;
CREATE TABLE `modules` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `when` int(10) unsigned NOT NULL,
  `type` varchar(45) NOT NULL,
  `fname` varchar(45) NOT NULL,
  `verbose` int(10) unsigned NOT NULL,
  `name` varchar(45) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

--
-- Table structure for table `news_cache`
--

DROP TABLE IF EXISTS `news_cache`;
CREATE TABLE `news_cache` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `url` text NOT NULL,
  `name` text NOT NULL,
  `fid` int(10) unsigned NOT NULL,
  `date` datetime NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=763388 DEFAULT CHARSET=latin1;

--
-- Table structure for table `news_feeds`
--

DROP TABLE IF EXISTS `news_feeds`;
CREATE TABLE `news_feeds` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(45) NOT NULL,
  `url` text NOT NULL,
  `description` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;

--
-- Table structure for table `news_users`
--

DROP TABLE IF EXISTS `news_users`;
CREATE TABLE `news_users` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `uid` int(10) unsigned NOT NULL,
  `fid` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Table structure for table `nickserv`
--

DROP TABLE IF EXISTS `nickserv`;
CREATE TABLE `nickserv` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `userid` int(10) unsigned NOT NULL,
  `nick` varchar(45) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Table structure for table `servers`
--

DROP TABLE IF EXISTS `servers`;
CREATE TABLE `servers` (
  `servid` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(45) NOT NULL default '',
  `description` varchar(45) NOT NULL default '',
  PRIMARY KEY  (`servid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `settings`
--

DROP TABLE IF EXISTS `settings`;
CREATE TABLE `settings` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(45) NOT NULL default '',
  `value` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Table structure for table `user_chan`
--

DROP TABLE IF EXISTS `user_chan`;
CREATE TABLE `user_chan` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `userid` int(10) unsigned NOT NULL default '0',
  `chanid` int(10) unsigned NOT NULL default '0',
  `modes` varchar(45) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `userid` int(10) unsigned NOT NULL auto_increment,
  `nick` varchar(45) NOT NULL default '',
  `user` varchar(45) NOT NULL default '',
  `host` varchar(65) NOT NULL default '',
  `realname` varchar(200) NOT NULL default '',
  `modes` varchar(45) default NULL,
  `snomask` varchar(45) default NULL,
  `oflags` varchar(45) default NULL,
  `swhois` varchar(200) default NULL,
  `ip` text,
  `vhost` varchar(65) default NULL,
  `servid` int(10) unsigned NOT NULL default '0',
  `loggedin` int(11) NOT NULL default '-1',
  PRIMARY KEY  (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2008-01-19  3:41:23

@ghost
Copy link
Author

ghost commented Apr 3, 2014

It's a starting point. I'll try and dedicate a bit of time to this and pull-request if I make headway

@SnoFox
Copy link
Member

SnoFox commented Apr 3, 2014

Seriously, trying to set this up in a dev environment was hell. Admittedly this was several years ago when I was a complete noob, but I'm not sure if you want to put yourself through the pain and agony :P

@SnoFox
Copy link
Member

SnoFox commented Apr 3, 2014

Although if you do get it functioning, PRs would be nice. Move the ClueNet-specific stuff to modules that are disabled by default or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants