Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7707887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:28:22+00:00 2026-06-01T00:28:22+00:00

How do I import this database correctly? https://github.com/samanz/cakecart Every time I import then I

  • 0

How do I import this database correctly?

https://github.com/samanz/cakecart

Every time I import then I get this error:

Error

SQL query:

CREATE TABLE `categories` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`name` VARCHAR( 50 ) NULL default NULL ,
`parent_id` INT( 11 ) UNSIGNED default '0',
`order` INT( 3 ) default '0',
`image` VARCHAR( 50 ) NULL default NULL ,
`ids` VARCHAR( 225 ) NULL default NULL ,
`url` VARCHAR( 255 ) NULL default NULL ,
PRIMARY KEY ( `id` ) ,
FOREIGN KEY ( `parent_id` ) REFERENCES categories( `id` ) ,
UNIQUE KEY `url` ( `url` )
);

MySQL said: Documentation
#1005 - Can't create table 'db.categories' (errno: 150) 

Foreign key is error 150, but there’s much more tables than this error.

Please try import first then answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T00:28:23+00:00Added an answer on June 1, 2026 at 12:28 am

    THis one works:

    CREATE TABLE `categories` (
    `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
    `name` VARCHAR( 50 ) NULL default NULL ,
    `parent_id` INT( 11 ),
    `order` INT( 3 ) default '0',
    `image` VARCHAR( 50 ) NULL default NULL ,
    `ids` VARCHAR( 225 ) NULL default NULL ,
    `url` VARCHAR( 255 ) NULL default NULL ,
    PRIMARY KEY ( `id` ) ,
    FOREIGN KEY ( `parent_id` ) REFERENCES categories( `id` ) ,
    UNIQUE KEY `url` ( `url` )
    );
    

    Edit: Actually you only need to remove unsigned to make it work. But I don’t really know why you want it to be default 0. It should be default NULL which is the default default.. 🙂

    I believe the type of parent_id must be the same as id.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We need to import a SSJS library in a database using DXL. For this
When used like this: import static com.showboy.Myclass; public class Anotherclass{} what's the difference between
I am trying to import CSV file to SQL server database, with no success.
I want to retrieve a time stamp from a sql database with proper formatting.
I am trying to import data from a FoxPro database into Sql Server however
I'm trying to restore a database from an sql file through phpmyadmin import function.
Sherlog is an OSGi-based log analyzer, if I import this project as an workspace
Given this : import os import subprocess def check_server(): cl = subprocess.Popen([nmap,10.7.1.71], stdout=subprocess.PIPE) result
When I try to compile this: import java.awt.* ; class obj { public static
Having a snippet like this: import yaml class User(object): def __init__(self, name, surname): self.name=

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.