<?php

/**
* implement hook_schema() to declare our database tables.
*/
function cwis_user_schema() {
    $schema["cwis_user_messages"] = array(
        "description" => "Logs REST calls seen to prevent replay attacks.",
        "fields" => array(
            "timestamp" => array(
                "description" => "Message timestamp.",
                "type" => "int"),
            "cookie" => array(
                "description" => "Message cookie.",
                "type" => "text")
        ));

    return $schema;
}

/**
* implement hook_update_N() to create tables on upgrade.
*/
function cwis_user_update_7200()
{
    drupal_install_schema("cwis_user");
}