Michael, Hi. Well, straight away I can see that the your CREATE TABLE command includes specific directives that only apply to MySQL, e.g. ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci so that will most likely be the reason why it is ignored. I think you need to adapt MySQL's CREATE TABLE command to be compatible with 4D's SQL syntax.
I searched the 4D Tech archive and found this that might help you: http://4d.1045681.n5.nabble.com/Creating-SQL-Tables-td5716546.html Regards, Narinder Chandi, ToolBox Systems Ltd. -- -----Original Message----- From: 4D_Tech <[email protected]> on behalf of 4D Tech Mailing List <[email protected]> Reply-To: 4D Tech Mailing List <[email protected]> Date: Saturday, 22 June 2019 at 16:10 To: 4D Tech Mailing List <[email protected]> Cc: jarosz <[email protected]> Subject: Re: Import mysql dump into 4D v15, build database structure & import data Hi Narinder I have found that the SQL EXECUTE SCRIPT command will import records into a pre-existing database structure. So INSERT INTO `nmiep_action_logs` (`id`, `message_language_key`, `message`, `log_date`, `extension`, `user_id`, `item_id`, `ip_address`) VALUES (1, 'PLG_ACTIONLOG_JOOMLA_USER_LOGGED_IN', '{\"action\":\"login\",\"userid\":\"707\",\"username\":\"admin\",\"accountlink\":\"index.php?option=com_users&task=user.edit&id=707\",\"app\":\"PLG_ACTIONLOG_JOOMLA_APPLICATION_ADMINISTRATOR\"}', '2019-06-12 11:23:03', 'com_users', 707, 0, 'COM_ACTIONLOGS_DISABLED'), will import 1 record into the nmiep_action_logs table with 8 fields. However it will ignore this code in the sql dump/import file CREATE TABLE `nmiep_action_logs` ( `id` int(10) UNSIGNED NOT NULL, `message_language_key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `message` text COLLATE utf8mb4_unicode_ci NOT NULL, `log_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `extension` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `user_id` int(11) NOT NULL DEFAULT '0', `item_id` int(11) NOT NULL DEFAULT '0', `ip_address` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0.0.0.0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; Do I need to write a database structure creation routine to parse this? Or has anyone written one already? Or do newer versions of 4D interpret this and create the database table and fields? Thanks Michael ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

