BEGIN;

    CREATE TABLE new_sessions (
        user string,
        key string PRIMARY KEY,
        client string,
        protocol string,
        created int
    );

    INSERT INTO new_sessions SELECT * FROM sessions;
    
    DROP TABLE sessions;

    ALTER TABLE new_sessions RENAME TO sessions;

END;
