function actions_install() db_sqlapi_install('actions') end function actions_schema() return { ['actions'] = { ['fields'] = { ['aid'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = 0}, ['type'] = {['type'] = 'varchar', ['length'] = 32, ['not null'] = true, ['default'] = ''}, ['callback'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = ''}, ['parameters'] = {['type'] = 'text', ['not null'] = true, ['size'] = 'big'}, ['description'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = 0} }, ['primary key'] = {'aid'} }, ['actions_assignments'] = { ['fields'] = { ['hook'] = {['type'] = 'varchar', ['length'] = 32, ['not null'] = true, ['default'] = ''}, ['op'] = {['type'] = 'varchar', ['length'] = 32, ['not null'] = true, ['default'] = ''}, ['aid'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = ''}, ['weight'] = { ['type'] = 'int', ['not null'] = true, ['default'] = 0} }, ['index keys'] = { ['hook_op'] = {'hook', 'op'} } } } end