method createTable documentation in bbn\Db\Sync

function() { if (\is_array(self::$sync_connection)) { self::$sync_connection = new bbn\Db(self::$sync_connection); } if (class_exists('\\bbn\\Appui\\History') && bbn\Appui\History::$is_used) { self::$has_history = 1; } /** @todo Replace with DB functions */ if (self::$sync_connection->getEngine() === 'sqlite') { self::$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");', self::$table_sync ) ); } elseif (self::$sync_connection->getEngine() === 'mysql') { self::$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`);", self::$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.