News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Moving domains and hosts

Started by llyon, December 04, 2024, 05:10:18 PM

Previous topic - Next topic

llyon

I'm in the middle of moving both domains and to a new host and largely it's gone ok.

However, I suspect when I exported my DB that it didn't take everything over, for example this error I get on all fields that start with ID_  :

Field 'id_login' doesn't have a default value

Field 'id_login' doesn't have a default value
File: /home/u513109201/domains/commodore-128.org/public_html/Sources/LogInOut.php
Line: 704

As well as the "default value" missing, I note that value in the EXTRA fileld that should contain "AUTO_INCREMENT" is not there.

How do I export the database so that these fields are preserved ?

(I'm using PHPMyAdmin)



Chen Zhen


Due to the missing auto increment(s), it will flag that error for the affected tables.
I've had this happen in the past but forget what caused it at the time.

Is it possible that when you used the export option in phpmyadmin that you disabled the "AUTO_INCREMENT value" in error?
If you used the custom export to compress the db backup, it's possible that the auto increment setting may have been disabled when moving the mouse to the bottom part of the page to hit the export button.

Try exporting the db again using the custom option to compress it as gzipped, making sure the "Object creation options -> AUTO_INCREMENT value" is enabled.


My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

llyon

Chen - I'll give that a shot, pretty sure it was there by default - will double check.

llyon

Quote from: Chen Zhen on December 04, 2024, 11:02:29 PMDue to the missing auto increment(s), it will flag that error for the affected tables.
I've had this happen in the past but forget what caused it at the time.

Is it possible that when you used the export option in phpmyadmin that you disabled the "AUTO_INCREMENT value" in error?
If you used the custom export to compress the db backup, it's possible that the auto increment setting may have been disabled when moving the mouse to the bottom part of the page to hit the export button.

Try exporting the db again using the custom option to compress it as gzipped, making sure the "Object creation options -> AUTO_INCREMENT value" is enabled.



Just looked at the dumped DB (example below) - the statement is there - but not appearing in the new DB

-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `smf_admin_info_files`
--
ALTER TABLE `smf_admin_info_files`
  MODIFY `id_file` tinyint(4) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `smf_ads`
--
ALTER TABLE `smf_ads`
  MODIFY `ADS_ID` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `smf_attachments`
--
ALTER TABLE `smf_attachments`
  MODIFY `id_attach` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1142;

--
-- AUTO_INCREMENT for table `smf_background_tasks`
--
ALTER TABLE `smf_background_tasks`
  MODIFY `id_task` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2526;

--
-- AUTO_INCREMENT for table `smf_ban_groups`
--
ALTER TABLE `smf_ban_groups`
  MODIFY `id_ban_group` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=61;

Chen Zhen


I remember why I saw this before now but it's not related other than the no default value error.


Is the format SQL & the compatibility set to NONE (because it's the same) ?

If so, I can't think of anything that can cause this at the moment.
However, although it's a pain in the arse you can always compare the auto increment columns from a fresh SMF install & manually change them in the import. Afterward, run the repair settings to fix your paths (if necessary), run the SMF upgrade & then install the mods + themes you want.


My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

llyon

Quote from: Chen Zhen on December 05, 2024, 12:19:30 AMIs the format SQL & the compatibility set to NONE (because it's the same) ?


Yes

llyon

Found the issue - by default "Do not use AUTO_INCREMENT for zero values" is ticked on the import - it must be unticked.

Advertisement: