Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / IMaintainableDatabase.php
index 8395359..43cec28 100644 (file)
@@ -186,4 +186,23 @@ interface IMaintainableDatabase extends IDatabase {
         * @return array
         */
        public function listViews( $prefix = null, $fname = __METHOD__ );
+
+       /**
+        * Creates a new table with structure copied from existing table
+        *
+        * Note that unlike most database abstraction functions, this function does not
+        * automatically append database prefix, because it works at a lower abstraction level.
+        * The table names passed to this function shall not be quoted (this function calls
+        * addIdentifierQuotes() when needed).
+        *
+        * @param string $oldName Name of table whose structure should be copied
+        * @param string $newName Name of table to be created
+        * @param bool $temporary Whether the new table should be temporary
+        * @param string $fname Calling function name
+        * @return bool True if operation was successful
+        * @throws RuntimeException
+        */
+       public function duplicateTableStructure(
+               $oldName, $newName, $temporary = false, $fname = __METHOD__
+       );
 }