Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Sequence.php
Go to the documentation of this file.
1 <?php
7 
11 class Sequence
12 {
22  public function getCreateSequenceDdl(
23  $name,
24  $startNumber = 1,
25  $columnType = Table::TYPE_INTEGER,
26  $unsigned = true
27  ) {
28  $format = "CREATE TABLE %s (
29  sequence_value %s %s NOT NULL AUTO_INCREMENT,
30  PRIMARY KEY (sequence_value)
31  ) AUTO_INCREMENT = %d ENGINE = INNODB";
32 
33  return sprintf($format, $name, $columnType, $unsigned ? 'UNSIGNED' : '', $startNumber);
34  }
35 
42  public function dropSequence($name)
43  {
44  $format = "DROP TABLE %s";
45  return sprintf($format, $name);
46  }
47 }
$format
Definition: list.phtml:12
getCreateSequenceDdl( $name, $startNumber=1, $columnType=Table::TYPE_INTEGER, $unsigned=true)
Definition: Sequence.php:22
if(!isset($_GET['name'])) $name
Definition: log.php:14