The Schema API was introduced in Drupal 6, we should use it to create and drop tables rather than db_query(). See #146862: Schema API quick start guide.

I will try and provide a patch.

CommentFileSizeAuthor
#3 Paycom-534066.patch9.36 KBkscheirer
#2 Paycom-534066.patch9.27 KBkscheirer

Comments

kscheirer’s picture

kscheirer’s picture

Assigned: Unassigned » kscheirer
Status: Active » Needs review
StatusFileSize
new9.27 KB

Also, the database names should be prefixed with your module name, like paycom, paycom_EpochTransStats, and paycom_MemberCancelStats.

It doesn't look like you're using EpochTransStats at all, so I'm just removing that table.

The // $Id$ string will automatically be replaced by Drupal packing script when you make a release - you don't need additional credit info usually.

kscheirer’s picture

StatusFileSize
new9.36 KB

added a @file declaration and removed some excess whitespace.

hypertext200’s picture

Status: Needs review » Patch (to be ported)

Looking forward to commit to CVS

kscheirer’s picture

looks like I've misunderstood how your module works somewhat, sorry for the confusion.

I just recently got access to the docs that describe Epoch's operation, including the fact that MemberCancelStats and EpochTransStats are tables that get populated automatically by Epoch, not by this module. Because of that, the table names cannot change. It also means the schema api cannot be used, I'm fairly sure it requires tables to share a namespace with the module (ie all table names would have to start with paycom).

kscheirer’s picture

you do know I can't commit to your CVS repository, right? You are the only maintainer for this project - I can only post patches.

hypertext200’s picture

Now I grant access to you, you can commit these patches now :)