function statistics_install() db_sqlapi_install('statistics') end function statistics_schema() return { ['accesslog'] = { ['fields'] = { ['aid'] = {['type'] = 'serial', ['not null'] = true}, ['sid'] = {['type'] = 'varchar', ['length'] = 64, ['not null'] = true, ['default'] = ''}, ['title'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = ''}, ['path'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = ''}, ['url'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = ''}, ['hostname'] = {['type'] = 'varchar', ['length'] = 128, ['not null'] = ''}, ['uid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = '', ['default'] = 0}, ['timer'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}, ['timestamp'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}}, ['indexes'] = { ['accesslog_timestamp'] = {'timestamp'}}, ['primary key'] = {'aid'}}} end