3
respostas

Error com a migration de criacao da tabela medicos

Criei o file .sql

create table medicos(

    id bigint not null auto_increment,
    name varchar(100) not null,
    mail varchar(100) not null unique,
    code varchar(6) not null unique,
    category varchar(100) not null,
    street varchar(100) not null,
    zip_code int(10) not null,
    region varchar(30) not null,
    number varchar(30),
    more varchar(100),
    city varchar(60) not null,

    primary key(id)
);

Mas quando rodo a aplicacao da esse erro : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Flyway Teams Edition or MySQL upgrade required: MySQL 5.7 is no longer supported by Flyway Community Edition, but still supported by Flyway Teams Edition.

No stackoverflow alguém tinha um problema igual e resolveu atualizando a versao do postgres mas com MySql, podem me ajudar?

3 respostas

Oi!

O MySQL instalado no seu computador está na versão 5.7, que não é mais suportado pelo Flyway.

Instale o MySQL 8 no seu computador: https://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-community-8.0.33.0.msi

Ola!

Obrigada pelo link, mas estou no mac os e fiz um brew upgrade mysql = Warning: mysql 8.0.33_3 already installed Pensei que estava ok, mas quando me conectei de novo com o comando mysql -u root -p no meu projeto ele diz : Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1086 Server version: 5.7.32 MySQL Community Server (GPL)

A versao continua sendo a 5.7 mesmo eu tendo a 8 no meu pc. Estou testando comandos que encontro na internet mas nada ainda funcionou. Pode me ajudar, por favor ?

Tentei esse tuto desinstalando e reinstalando mas tbm da erro: https://dev.to/ibrarturi/how-to-upgrade-mysql-57-to-80-on-mac-8ho

Error: The brew link step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/mysql Target /usr/local/bin/mysql already exists. You may want to remove it: rm '/usr/local/bin/mysql'

To force the link and overwrite all conflicting files: brew link --overwrite mysql

Possible conflicting files are: /usr/local/bin/mysql -> /Applications/MAMP/Library/bin/mysql

Moenah ~ % brew link --overwrite --dry-run mysql Would remove: /usr/local/bin/mysql -> /Applications/MAMP/Library/bin/mysql moemendes@Air-de-Moenah ~ % brew services listName Status User File mysql nonemoemendes@Air-de-Moenah ~ % mysql -Vmysql Ver 14.14 Distrib 5.7.32, for osx10.12 (x86_64) using EditLine wrapper

moemendes@Air-de-Moenah ~ % brew services start mysql ==> Successfully started mysql (label: homebrew.mxcl.mysql) moemendes@Air-de-Moenah ~ % brew services listName Status User File mysql error 256 moemendes ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist