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

  • Home
  • SEARCH
  • 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

First of all, let me just say that I'm using the PHP framework Yii,
I'm creating a website using MVC framework (Yii) and I need to dynamically create
I was just curious if Yii is supposed to be compiled into PHP or
With Yii php framework, I use inheritance. In my AbstractModel, I have this method:
In Yii, when access to <app-host>/index.php?r=<mycontroller>/<myaction> , the framework will start to run code
I have recently made the shift to a framework called the Yii Framework. Really
To begin, I'm working entirely in PHP using the Yii framework, although Yii ultimately
Now I am working with yii framework and I'd like to wrote something like
I'm using PHP (Yii-framework) and MySQL database on my site. Users can post and
I'm using YII framework. I can access my site through: localhost/index.php then If I

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.