summaryrefslogtreecommitdiff
path: root/plugins/session/install.php
blob: 29771b323bfa7db15855f55a476109e4af4aeb6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

define('ROOT', __DIR__ . '/../../');

require_once ROOT . 'plugins/session/session.module';
require_once ROOT . 'config.php';

$db = session_db($config['session']['mysql']);

$db->exec(sprintf(<<<SQL
CREATE TABLE `%s` (
	username VARCHAR(255),
	secret VARCHAR(40),
	created INT,
	PRIMARY KEY(username, secret),
	INDEX(created)
);
SQL
, $config['session']['mysql']['tablename']));