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




--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**********************************************************************
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]
**********************************************************************

Reply via email to