function comment_install() db_sqlapi_install('comment') end function comment_schema() return { ['comments'] = { ['fields'] = { ['cid'] = {['type'] = 'serial', ['not null'] = true}, ['pid'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['nid'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['uid'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['subject'] = {['type'] = 'varchar', ['length'] = 64, ['not null'] = true, ['default'] = ''}, ['comment'] = {['type'] = 'text', ['not null'] = true, ['size'] = 'big'}, ['hostname'] = {['type'] = 'varchar', ['length'] = 128, ['not null'] = true, ['default'] = ''}, ['timestamp'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['score'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0, ['size'] = 'medium'}, ['status'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}, ['format'] = {['type'] = 'int', ['size'] = 'small', ['not null'] = true, ['default'] = 0}, ['thread'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true}, ['users'] = {['type'] = 'text', ['not null'] = '', ['size'] = 'medium'}, ['name'] = {['type'] = 'varchar', ['length'] = 60, ['not null'] = ''}, ['mail'] = {['type'] = 'varchar', ['length'] = 64, ['not null'] = ''}, ['homepage'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = ''} }, ['indexes'] = { ['nid'] = {'nid'}, ['status'] = {'status'}}, ['primary key'] = {'cid'} }, ['node_comment_statistics'] = { ['fields'] = { ['nid'] = {['type'] = 'serial', ['unsigned'] = true, ['not null'] = true}, ['last_comment_timestamp'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['last_comment_name'] = {['type'] = 'varchar', ['length'] = 60, ['not null'] = ''}, ['last_comment_uid'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['comment_count'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0} }, ['indexes'] = { ['node_comment_timestamp'] = {'last_comment_timestamp'} }, ['primary key'] = {'nid'} } } end