collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: BeBot 0.3 Database Schema  (Read 15106 times)

0 Members and 1 Guest are viewing this topic.

Offline Gilfar

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
BeBot 0.3 Database Schema
« on: November 08, 2006, 10:00:18 pm »
Hello,

It would be nice to have a BeBot 0.3 database schema available for download either as a file inside the BeBot bundle or just a link in this thread.

Thanks in advance.

--
Sincerely,
Gilfar

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: BeBot 0.3 Database Schema
« Reply #1 on: November 09, 2006, 05:18:57 am »
The database is made (tables/fields etc) when the modules are loaded.

But again, that wouldn't be a bad idea to make it all into 1 schema so it only has to be loaded once.
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Gilfar

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: BeBot 0.3 Database Schema
« Reply #2 on: November 09, 2006, 05:49:55 am »
Reason I ask is that I'm test driving 0.3.4 and it seems that not all the tables are there.

Unless I'm doing something horribly wrong.

And yes, the idea was to hopefully get a database schema module or as part of a configuration process.

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: BeBot 0.3 Database Schema
« Reply #3 on: November 09, 2006, 07:39:10 am »
Post what the error is?

I can probably let you know what to add.

Also: 0.3.4 is not stable, nor completely supported yet. As it's in dev, expect some problems. You're best to use 0.2.9 as that's stable. (unless you don't mind the bugs :P)
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Gilfar

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: BeBot 0.3 Database Schema
« Reply #4 on: November 11, 2006, 01:54:40 am »
With an empty database, BeBot 0.3.4 creates the following:

admin_groups
admin_members
alts
auto_msg
blacklist
botname_tablenames
commands
logon
news
org_city
raid_points
settings
tower_attack
tower_result
users
whois

No, I'm not certain I know where I'm going with this. Maybe it can be used to change the configuration of the
bots in some later version, where - for instance - all modules and related database information are located
in one file (an extended Bot.conf-file).

Or perhaps it can be used as a start to have a serious look at the database to see if it's possible to normalize it or make other modifications to it.
« Last Edit: November 11, 2006, 03:08:05 am by Gilfar »

Offline myste

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
  • shallabais
Re: BeBot 0.3 Database Schema
« Reply #5 on: December 27, 2006, 12:27:10 pm »
Yeah its creating those, except for the "settings" table.. anyone have the SQL Create code for that somewhere?

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: BeBot 0.3 Database Schema
« Reply #6 on: December 29, 2006, 11:55:44 am »
The 'settings' table is created the first time Bebot is ran.
The code that creates it is located in Bot.php:
Code: [Select]
$this -> db -> query("CREATE TABLE IF NOT EXISTS settings
              (setting VARCHAR(255) NOT NULL PRIMARY KEY,
              value VARCHAR(255))");
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: BeBot 0.3 Database Schema
« Reply #7 on: December 29, 2006, 05:18:18 pm »
If you're using the 0.3 from SVN the settings table is different from what Xenixa  posted as I've added a core module for managing settings as well as a global settings interface. See http://bebot.link/index.php/topic,607.0.html

I haven't downloaded the actual "release" version of BeBot 0.3, I've been working on the SVN trunk, and it seems to work fine. ;)

Offline myste

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
  • shallabais
Re: BeBot 0.3 Database Schema
« Reply #8 on: December 30, 2006, 10:32:59 pm »
I was using trunk, and indeed the settings scheme is different. Only problem was the table was not created. May it have something to do with table prefixes?

Edit:  Running the SQL manually gave me the following error:
Error Code : 1071
Specified key was too long; max key length is 1000 bytes

Something with my DB settings messing things up?
« Last Edit: December 30, 2006, 11:31:20 pm by myste »

Offline the_mgt

  • BeBot Rookie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: BeBot 0.3 Database Schema
« Reply #9 on: July 02, 2007, 06:32:22 pm »
Hi!
Dunno if you are still interested, but this error is rather common on Mysql versions using utf8.
Has something to do with utf8 using more bytes for characters then 1, i think it is three. So search the files in the bot directory for "varchar(255)" and set it to "varchar(100)". This usually solves this problem, but limits entry-length on these fields (which i think is not really a problem).

Have fun.

BTW: Great bot, we just dismissed our old IGNbot and are using BeBot now, much better and more stylish.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: BeBot 0.3 Database Schema
« Reply #10 on: July 02, 2007, 06:49:26 pm »
The other option is to define the default character set for the tables BeBot uses. On a related note, some modules expect the behavior of one MySQL storage engine over another. When this is the case, the storage engine should also be specified. The module_settings table doesn't need a specific storage engine, but it was an example that I had handy.

Code: [Select]
CREATE TABLE IF NOT EXISTS `module_settings` (
 `module` varchar(255) NOT NULL default '',
 `setting` varchar(255) NOT NULL default '',
 `value` varchar(255) default NULL,
 `datatype` varchar(255) default NULL,
 PRIMARY KEY  (`module`,`setting`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 196
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal