The Lyceum Database Schema

Lyceum multi-blogifies WordPress and adds almost no other features. The Lyceum database schema, as one might expect, is very similar to the WordPress schema, only adding infrastructure to associate data with blogs. Below is an overview of the differences between the WordPress and Lyceum schemata.

The first thing to notice about the Lyceum schema is the addition of the blogs table. The blogs table has the following columns:

  • id (int) The id number of the blog.
  • slug (varchar) The string that is used in the blog’s base url. http://myslug.blogs.example.com/ or http://blogs.example.com/myslug
  • status (enum: active, deleted) Blogs in Lyceum can be deactivated by a system administrator (from http://example.com/system-admin/blog-management.php?b=system).

The following tables from the WordPress schema have a blog (int) column added to them, which are references to a row in the blogs table:

  • categories
  • linkcategories
  • options
  • usermeta

And lastly, a few additional columns have been added:

  • options: optiondomain (enum: system, blog)
    This keeps track of if an option is relevant to the entire Lyceum system, or just one blog.
  • usermeta: meta_domain (enum: system, blog)
    This column serves the same function as options.optiondomain, described above.
  • users: user_locked (enum: 0,1) and user_admin (enum: 0,1)
    user_locked keeps track of if a user has been restricted from logging into the system (managed from http://example.com/system-admin/user-management.php?b=system), and user_admin is a flag which denotes if a user is a Lyceum system administrator (of the entire system, and nothing to do with any individual blog).

The rest of the WordPress schema and code remain essentially unchanged. You may be wondering why there isn’t a blog column in more or all of the tables. This is because some of the tables are already associated with a blog through a table that does have a blog column. For example, all posts in WordPress must have a category. All categories in Lyceum may only be associated with one blog. Therefore, posts are associated with a blog through their categories, and the posts table does not need a blog column.


13 Comments so far
Leave a comment

All categories in Lyceum may only be associated with one blog.

Really? You can’t have the same category name across multiple blogs? Is there a workaround for instances where the same category makes sense for more than one? (”Assignments” for example, in an educational environment.)

Otherwise, this all sounds fantastic. :)

Really? You can’t have the same category name across multiple blogs?

Fear not, categories in different blogs can have the same name, but in the database they will have different id numbers.

Why do you needs a blog column in the *usermeta*? The *usermeta* is associated with *users* and I think we can place blog column in the *users* table, so we no needs to insert a blog id for each usermeta, just one time when create a new user.

Actually, users are not associated with any particulare blogs. Any user can have any permissions on any blog. (or no permissions at all).

usermeta data, however, is associated per blog. For example, the permissions data is kept in the usermeta table, and gives a particular user particular permissions on a particular blog.

let me know if that doesn’t make sense.

Hello,

I was messing around with the lyceumposts table and I notice that there is a column called guid. This is basically a unique value that is the url to the blog. Unfortunately, if one changes the slug, the guid is not modified to reflect the change. So, I was writting a recent post plugin and was trying to return an href for the title, but I guess the GUI is not updated when the slug changes and can’t accurately be done this way.

What is the best way to build a link to a blog. Is there a database schema for wordpress or lyceum?

MAR- thanks for the bug report! I made a ticket:

http://source.ibiblio.org/trac/lyceum/ticket/564

You can make tickets yourself. That is the best way to report bugs and request features.

We are making a decision in our University between WordPress MU and Lyceum. Our enterprise blogging will start small, so I’m thinking of starting with individual WordPress installations, using a common theme. Then, I would like to know if, once Lyceum is beyond beta, will there be a way to import individual blogs into Lyceum so we don’t lose what we’ve got?

“will there be a way to import individual blogs into Lyceum so we don’t lose what we’ve got?”

I am also very interested in this. I see that you can import from every major blog engine except Wordpress. Will this change in the future?

Sweet. One of the reasons that I’m really interested in Lyceum is because you have way better documentation than Wordpress MU does.

Is there a way that an Admin can set who has the abillity to edit XHTML/CSS files on a per user basis?

The better place for support and questions is the email list and IRC channel

http://lyceum.ibiblio.org/support

It’s very beautifully.

Hi,

Its what i was looking for so long. I was about to do my own conversion of database scheme in wordpress MU..

However, i have a concern of performance here..

In our concern, we have around 50,000 employees, and we plan to give one blog to each employee.. and apart from that, create common blogs for teams..

So, for such huge deployment, will creating common tables create any performance issues?

I am so impressed with this work, that i plan to use this lyceum software for my current blog upgradation.

I would also be glad to contribute to this project.



WAIT! If you need Lyceum support, use the email list or IRC channel. If you have found a bug, file a ticket or send email to lyceum-bugs AT lists DOT ibiblio DOT org.

 

Leave a comment
HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>