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 7171277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:22:56+00:00 2026-05-28T15:22:56+00:00

I am trying to create a custom table using custom module. I have been

  • 0

I am trying to create a custom table using custom module. I have been following Alan Storm’s article to create a custom table

This is my folder structure

CM
 Tablecreation
 etc >> config.xml (has 1.6.0.0 as the version mentioned)
 Helper >> Data.php
 controllers >> IndexController.php
 Model
  Actualtable.php
  Mysql4
   Actualtable.php
  Resource
   Mysql4
     Setup.php
  sql
   tablecreation_setup
     install-1.6.0.0.php

This is my config.xml file.

  <?xml version="1.0" encoding="UTF-8"?>
  <config>
  <modules>
    <CM_Tablecreation>
        <version>1.6.0.0</version>
    </CM_Tablecreation>
</modules>
<frontend>
    <routers>
        <tablecreation>
            <use>standard</use>
            <args>
                <module>CM_Tablecreation</module>
                <frontName>tablecreation</frontName>
            </args>
        </tablecreation>
    </routers>
</frontend>    
<global>

    <models>
        <tablecreation>
            <class>CM_Tablecreation_Model</class>
            <resourceModel>tablecreation_mysql4</resourceModel>
        </tablecreation>
        <tablecreation_mysql4>
        <class>CM_Tablecreation_Model_Mysql4</class>     
        <entities>
            <actualtable>
                <table>actual_table</table>
            </actualtable>
        </entities>                    
    </tablecreation_mysql4>
    </models>

    <resources>
    <tablecreation_setup>
    <setup>
        <module>CM_Tablecreation</module>
        <class>CM_Tablecreation_Model_Resource_Mysql4_Setup</class>
    </setup>
    <connection>
        <use>core_setup</use>
    </connection>
    </tablecreation_setup>
    <tablecreation_write>
        <connection>
            <use>core_write</use>
        </connection>
    </tablecreation_write>
    <tablecreation_read>
        <connection>
            <use>core_read</use>
        </connection>
    </tablecreation_read>      
</resources>      

    <helpers>
            <tablecreation>
                <class>CM_Tablecreation_Helper</class>
            </tablecreation>
    </helpers>
</global>
</config>

And this is the error I get every time

  a:5:{i:0;s:69:"/home/dev/public_html/app/code///sql/tablecreation_setup not found";i:1;s:818:"#0 /home/dev/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.0.0')

I tried debugging by putting try catch with exception messages in app/code/core/Mage/Core/Resource/Setup.php as suggested in some of the previous similar questions on this topic, but to no success

My module isn’t even getting listed in core_resource table. And even if some how it does, the table surely never gets created.

I have also had the situation when it did list in core_resource table but If I delete my module’s record from the table (to run install script again) and then try to refresh any page of my site I again end up getting error page opening the report of which I find the same error.

Basically any article over the net I follow, I get stuck at this same error. Please help me explain this error and what’s causing it. Probably also if some one can suggest what’s the solution to sort it.

Many thanks in advance.

  • 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-05-28T15:22:57+00:00Added an answer on May 28, 2026 at 3:22 pm

    I can see a couple of issues with what you’ve posted:

    1. Your install script needs to be called mysql4-install-1.6.0.0.php. If Magento can’t find the setup script because it’s named incorrectly, it won’t be able to run it, so I’d rename your install-1.6.0.0.php to mysql4-install-1.6.0.0.php.

    2. You’ll need a resources tag in the global section in your config.xml file which looks like this:

      <resources>
          <tablecreation_setup>
              <setup>
                  <module>CM_Tablecreation</module>
              </setup>
              <connection>
                  <use>core_setup</use>
              </connection>
          </tablecreation_setup>
      </resources>
      
    3. Check your app/etc/modules.CM_Tablecreation.xml file. The error message you’ve posted is interesting in that the code pool and module name is missing from the path where it’s attempting tom locate the setup file. Check that your xml file has a config > modules > YourModule_NameHere > codePool tag (note codePool with a capital P) which contains the string “core”, “community” or “local” depending on the location in which your module resides.

    You may find some assistance in my previous answer to a similar question, and Alan Storm’s definitive answer on the subject.

    PS: Your extension version doesn’t need to be the same version number as Magento itself. Just start with whatever version number makes you happy and increment as required.

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

Sidebar

Related Questions

I'm trying to create a custom module using Magento's EAV structure and have been
I'm trying to create a custom control - a button - which will have
I have been trying this one tonight for a while.... I have a UIActionSheet
I'm trying to create a custom table view cell that has a button on
I'm trying to create a table-less layout using floats, but I'm having trouble getting
Im trying to create a custom version of the RequiredAttribute to replace the built
I'm trying to create a custom JSP tag that would take an array object
I am trying to create a custom accordion for my page to that display
I'm trying to create a custom transition, to serve as a replacement for a
I'm trying to create a custom UIButton that should look like a UIButtonTypeRoundedRect. In

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.