newbie question

18 views
Skip to first unread message

jredfish

unread,
Jun 30, 2012, 1:29:14 AM6/30/12
to on...@googlegroups.com
The site I am developing consists of a dash board home page based upon projects/equipment data that is editable by project admins in a back-end I have already developed.

My question is whether there are limitations/recommendations as to extending the main OnPub database to include the project/equipment data specific to my site.

Thanks

John

Onpub.com

unread,
Jun 30, 2012, 11:04:43 AM6/30/12
to on...@googlegroups.com
Hi John, if you're planning to extend the core Onpub database schema, my suggestion is to do it in a way such that your changes are compatible and/or easy to re-incorporate with future versions of Onpub.

It's probably easier to remain forwards-compatible if you add your site-specific data to a new table within your Onpub database, as opposed to modifying one of the existing Onpub tables like OnpubArticles. This guarantees that schema changes we make to the included tables will not clash with any of your custom schema. If you modify the core schema, there's a possibility a future Onpub upgrade will introduce schema that conflicts with your own column names, data types, etc.. If you put your extensions in separate tables, you should be able to use foreign keys and/or map tables and then use SQL join queries to relate the core Onpub data with your own rows of data.

This of course assumes you plan to upgrade Onpub once in a while to take advantage of improvements we make. If you plan to maintain your own, totally custom version of Onpub, then compatibility with the upstream code is less of a concern. Though, even if you don't plan to upgrade, it's still good practice to keep your local data in separate tables, especially if the data represents some other type of real-world object. For example, Articles are totally different from Projects, and so it would make sense to create a new DB table to track Projects anyway.

For the new table name(s), my suggestion would be to prefix them with a name other than Onpub. So if you are planning to create a new table within your Onpub DB to track Projects, don't call it OnpubProjects for the same reasons as above. If you call it something like CompanyProjects, or just Projects, then that pretty much guarantees no future conflict with the core table names themselves. Any new tables introduced by us will always have a prefix of Onpub in their name.

Anyway, I hope I answered your question. Let me know if you have any others.

Corey
Reply all
Reply to author
Forward
0 new messages