# storeengine/2.2.0/includes/database/create-sessions.php

StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates &amp; More, version 2.2.0. 25 lines.

- Page: https://pluginprobe.com/plugins/storeengine/2.2.0/code/includes/database/create-sessions.php
- Raw: https://pluginprobe.com/plugins/storeengine/2.2.0/raw/includes/database/create-sessions.php
- Modified: 2025-07-31T09:22:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/storeengine/2.2.0/code/includes/database/create-sessions.php#L10-L20`.

```php
<?php

namespace StoreEngine\Database;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class CreateSessions {

	public static function up( $prefix, $charset_collate ) {
		$table_name = $prefix . 'storeengine_sessions';
		$sql        = "CREATE TABLE IF NOT EXISTS {$table_name} (
			`session_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
			`session_key` char(32) NOT NULL,
			`session_value` longtext NOT NULL,
			`session_expiry` bigint(20) unsigned NOT NULL,
			PRIMARY KEY (`session_id`),
			UNIQUE KEY `session_key` (`session_key`)
		) $charset_collate;";

		dbDelta( $sql );
	}
}

```
