method createTable documentation in bbn\Db\Sync2

function() { if (\is_array($this->sync_connection)) { $this->sync_connection = new bbn\Db($this->sync_connection); } if (class_exists('\\bbn\\Appui\\History') && bbn\Appui\History::$is_used) { $this->has_history = 1; } /** @todo Replace with DB functions */ if ($this->sync_connection->getEngine() === 'sqlite') { $this->sync_connection->exec( sprintf( 'CREATE TABLE "%s" ( "id" INTEGER PRIMARY KEY NOT NULL , "db" TEXT NOT NULL , "tab" TEXT NOT NULL , "chrono" REAL NOT NULL, "action" TEXT NOT NULL, "rows" TEXT,"vals" TEXT, "state" INTEGER NOT NULL DEFAULT (0) ); CREATE INDEX "db" "dbsync" ("db"); CREATE INDEX "tab" "dbsync" ("tab"); CREATE INDEX "chrono" "dbsync" ("chrono"); CREATE INDEX "action" "dbsync" ("action"); CREATE INDEX "state" "dbsync" ("state");', $this->table_sync ) ); } elseif ($this->sync_connection->getEngine() === 'mysql') { $this->sync_connection->exec( sprintf( "CREATE TABLE IF NOT EXISTS `%s` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `db` varchar(50) NOT NULL, `tab` varchar(50) NOT NULL, `chrono` decimal(14,4) unsigned NOT NULL, `action` varchar(20) NOT NULL, `rows` text, `vals` longtext, `state` int(10) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `dbsync` ADD PRIMARY KEY (`id`), ADD KEY `db` (`db`), ADD KEY `tab` (`tab`), ADD KEY `chrono` (`chrono`), ADD KEY `action` (`action`), ADD KEY `state` (`state`);", $this->table_sync ) ); } }

BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.