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

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

- Page: https://pluginprobe.com/plugins/storeengine/2.2.0/code/includes/database/create-subscriptions.php
- Raw: https://pluginprobe.com/plugins/storeengine/2.2.0/raw/includes/database/create-subscriptions.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-subscriptions.php#L10-L20`.

```php
<?php

namespace StoreEngine\Database;

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

class CreateSubscriptions {

	public static function up( $prefix, $charset_collate ) {
		$table_name = $prefix . 'storeengine_subscriptions';
		$sql        = "CREATE TABLE {$table_name} (
            `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
            `user_id` INT(11) NOT NULL,
            `product_id` INT(11) NOT NULL,
            `price_id` INT(11) NOT NULL,
            `status` VARCHAR(255) NOT NULL,
            `interval` INT(11) NOT NULL,
            `interval_type` VARCHAR(255) NOT NULL,
            `hook` VARCHAR(255) NOT NULL,
            `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
            `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
            PRIMARY KEY (`id`)
        ) $charset_collate;";

		dbDelta( $sql );
	}
}

```
