L
L
londhor2017-05-21 06:29:28
Yii
londhor, 2017-05-21 06:29:28

How to disable namespace in yii migrations?

I have been unable to run YII2 migrations for several hours now.
This keeps popping up:

Tablespace for table '`delta`.`users`' exists. Please DISCARD the tablespace before IMPORT.

or
> create table users ...Exception 'yii\db\Exception' with message 'SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists
The SQL being executed was: CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `first_name` varchar(255),
  `last_name` varchar(255),
  `status` char(1),
  `password` varchar(255),
  `sity` varchar(255),
  `image` varchar(255),
  `login` varchar(255),
  `phone` varchar(255),
  `email` varchar(255)
)'

Error Info:
Array
(
    [0] => 42S01
    [1] => 1050
    [2] => Table 'users' already exists
)

No matter how many times I recreate the database, and no matter how many times I delete the namespace files, everything ends with this message.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arman, 2017-05-21
@Arik

it's more likely a mysql problem, has it been installed for a long time? in the settings are not wiser? maybe something with innodb_file_per_table? How critical will it be to demolish everything, including the files of the database itself, and re-set everything by default?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question