function poll_install() db_sqlapi_install('poll') end function poll_schema() return { ['poll'] = { ['fields'] = { ['nid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}, ['runtime'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['active'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}}, ['primary key'] = {'nid'}}, ['poll_choices'] = { ['fields'] = { ['chid'] = {['type'] = 'serial', ['unsigned'] = true, ['not null'] = true}, ['nid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}, ['chtext'] = {['type'] = 'varchar', ['length'] = 128, ['not null'] = true, ['default'] = ''}, ['chvotes'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['chorder'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}}, ['indexes'] = { ['nid'] = {'nid'}}, ['primary key'] = {'chid'}}, ['poll_votes'] = { ['fields'] = { ['nid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true}, ['uid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}, ['chorder'] = {['type'] = 'int', ['not null'] = true, ['default'] = -1}, ['hostname'] = {['type'] = 'varchar', ['length'] = 128, ['not null'] = true, ['default'] = ''}}, ['indexes'] = { ['hostname'] = {'hostname'}, ['nid'] = {'nid'}, ['uid'] = {'uid'}}}} end