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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:38:32+00:00 2026-05-23T17:38:32+00:00

In Yii framework I used migration just like ./yiic migrate create tbl_demo it made

  • 0

In Yii framework I used migration just like
./yiic migrate create tbl_demo
it made the migration file where I entered the values for up like

<?php

class m110714_094912_tbl_demo extends CDbMigration
{
  public function up()
  {
    $this-> createTable('{{tbl_demo}}', array(
      'id' => 'pk',
      'name' => 'VARCHAR \'80\' NOT NULL',
    ))
  }

  public function down()
  {
    echo "m110714_094912_tbl_demo does not support migration down.\n";
    return false;
  }

  /*
  // Use safeUp/safeDown to do migration with transaction
  public function safeUp()
  {
  }

  public function safeDown()
  {
  }
  */
}

after entering this it is showing message like

New migration created successfully.

But whenever I am checking mysql database there is no table for tbl_demo is found. I also put all the values of up in safeup but it not made any result.Every thing is working fine but don’t know why new table is not creating? Please help me

  • 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-23T17:38:33+00:00Added an answer on May 23, 2026 at 5:38 pm

    You should go to the command line and call yiic migrate up and it will ask you if you want to apply the tbl_demo migration and when you type in “yes” it will execute the code. The message New migration created successfully. appears when you execute yiic migrate create -something- not when you apply the migration.

    If you want to apply the migration again, you should delete the row regarding “tbl_demo” migration in the “migrations” db table that yiic created to log the migrations.

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

Sidebar

Related Questions

I'm working with yii framework forms and I have a form like this: <?php
can anyone convert this code into the yii framework? file name: text.php <form method='POST'
I have used yii framework in php extensively and find scenarios very useful. to
I would like to know whether yahoo php hosting supports yii framework by default
In Yii framework, the main config file defines components. one of which is urlManager:
I am using mysql with php Yii framework.When doing data modelling I came accross
I am doing an application in Yii Framework.I have progressed to some way like
I am new to the Yii framework and I would like to know the
folders structure: htdocs: --includes ----yii ------framework --------vendors ----------my_vendor1.php ----------my_vendor2.php --site1 --site2 How to import
I like to raise some questions regrading Yii framework and Android applications. I am

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.