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

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

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

```php
<?php

namespace StoreEngine\Database;

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

class CreateIntegration {

	public static function up( $prefix, $charset_collate ) {
		$table_name = $prefix . 'storeengine_integrations';
		$sql        = "CREATE TABLE IF NOT EXISTS {$table_name} (
			id bigint(20) unsigned NOT NULL auto_increment,
			product_id bigint(20) unsigned NOT NULL,
			price_id bigint(20) unsigned NOT NULL,
			integration_id bigint(20) unsigned NOT NULL,
			provider varchar(155) NOT NULL,
			variation_id bigint(20) unsigned,
			created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
			updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
			PRIMARY KEY (id),
			INDEX product_id (product_id),
			INDEX price_id (price_id),
			INDEX integration_id (integration_id),
			INDEX variation_id (variation_id)
		) $charset_collate;";

		dbDelta( $sql );
	}
}

```
