#1067 - Invalid default value for 'created_datetime'

Please assist?

-- SQLINES LICENSE FOR EVALUATION USE ONLY create table `Order` ( `uid` bigint, `delivery_address` varchar(256), `complex_unit_no` varchar(200), `delivery_latitude` varchar(20), `delivery_longitude` varchar(20), `store_uid` bigint, `app_version` varchar(10), `delivery_fee` varchar(10), `amended_delivery_fee` varchar(10), `bottles_fee` varchar(10), `amended_bottles_fee` varchar(10), `promo_code` varchar(50), `promo_discount` varchar(10), `promo_discount_amount` varchar(10), `promo_discount_type` varchar(10), `user_agent_string` varchar(512), `amended_promo_code` varchar(50), `amended_promo_discount` varchar(10), `amended_promo_discount_amount` varchar(10), `amended_promo_discount_type` varchar(10), `delivery_notes` varchar(30), `items_total` varchar(30), `amended_items_total` varchar(10), `order_total` varchar(10), `this_order_total` varchar(10), `amended_order_total` varchar(30), `adjusted_items_total` varchar(30), `adjusted_datetime` timestamp, `adjusted_order_total` varchar(10), `outstanding_amount` varchar(10), `crc` varchar(10), `created_datetime` timestamp, `placed_datetime` timestamp, `transaction_sequence` varchar(20), `user_uid` int, `status` varchar(3), `accepted_datetime` timestamp, `picking_datetime` timestamp, `edi_order_no` varchar(50), `edi_invoice_status` varchar(7), `edi_invoice_no` varchar(50), `edi_message_response` varchar(500), `last_status_changed_datetime` timestamp, `edi_credit_status` varchar(7), `amended_datetime` timestamp, `vendor_amended_datetime` timestamp, `vendor_viewed_datetime` timestamp, `user_amending_datetime` timestamp, `user_substituted` varchar(1), `rating` varchar(1), `rating_comment` varchar(2000), `confirmed_datetime` timestamp, `delivered_datetime` timestamp, `delivery_integration_enabled` varchar(1), `paid_in_full` varchar(1), `driver_name` varchar(80), `driver_contact_no` varchar(40), `invoice_no` varchar(20), `ppay_requested` varchar(1), `ppay_payment_id` varchar(50), `driver_cancelled` varchar(1), `bottles_notes` varchar(150), `bottles_agent_name` varchar(50), `driver_started_delivery` varchar(1), `driver_tracking_link` varchar(300), `vendor_need_help` varchar(1), `has_vendor_viewed_order` varchar(1), `picking_slip_pn_sent` varchar(20), `vendor_ready_for_driver` varchar(1), `driver_ready_datetime` timestamp, `driver_status` varchar(17), `vendor_driver_collected` varchar(1), `delivery_integration_service_name` varchar(6), `show_driver_tracking` varchar(1), `payment_method` varchar(4), `possible_fraud` varchar(1), `invoice_status` varchar(8), `driver_tip` decimal(10, 2), `order_type` varchar(2), `picker_name` varchar(100) )

Answer Answered by Daniel Black in this comment.

The create statement above doesn't include a default value for created_datetime.

There are a few SQL_MODE settings that control the validity of dates.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.