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:
categorieslinkcategoriesoptionsusermeta
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.