1050: Table already exists
MySQLO que significa?
A tabela que está sendo criada já existe. O CREATE TABLE falhou porque existe uma tabela com o mesmo nome.
Por que acontece?
Recriação de uma tabela existente; um script executado duas vezes; migrations aplicadas novamente; outro objeto (uma view) usando o mesmo nome.
Como resolver
Use IF NOT EXISTS para criar a tabela somente se ela não existir: CREATE TABLE IF NOT EXISTS my_table (...); Se você realmente quiser recriá-la, remova-a primeiro: DROP TABLE IF EXISTS my_table; Liste as tabelas existentes: SHOW TABLES; Torne as migrations seguras para reexecução (idempotentes).
Mais entradas deste banco
- 1292Incorrect datetime value / truncated incorrect value
- 1406Data too long for column
- 1071Specified key was too long; max key length is 767 bytes
- 1051Unknown table 'x'
- 1091Can't DROP 'x'; check that column/key exists
- 1093You can't specify target table 'x' for update in FROM clause
- 1305PROCEDURE does not exist