Group Group Group Group Group Group Group Group Group

Error migration to my local mysql server

I am using a local mysql server ver 5.1. Here my configuration file, as described in the book chapter 6 with my parameters.

import FluentMySQL

import Vapor

/// Called before your application initializes.
public func configure(_ config: inout Config, _ env: inout Environment, _ services: inout Services) throws {
/// Register providers first
try services.register(FluentMySQLProvider())

/// Register routes to the router
let router = EngineRouter.default()
try routes(router)
services.register(router, as: Router.self)

/// Register middleware
var middlewares = MiddlewareConfig() // Create _empty_ middleware config
/// middlewares.use(FileMiddleware.self) // Serves files from `Public/` directory
middlewares.use(ErrorMiddleware.self) // Catches errors and converts to HTTP response

/// Register the configured SQLite database to the database config.
var databases = DatabasesConfig()
let databaseConfig = MySQLDatabaseConfig(hostname: "",
                                         username: "root",
                                         password: "admin",
                                         database: "vapor")
let database = MySQLDatabase(config: databaseConfig)

databases.add(database: database, as: .mysql)

/// Configure migrations
var migrations = MigrationConfig()
migrations.add(model:Acronym.self, database: .mysql)
//migrations.add(model: Todo.self, database: .sqlite)

I get the following error, I think its an error of migration.
Thread 1: Fatal error: Error raised at top level: :warning: MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(6) , updatedAt DATETIME(6) )’ at line 1

Hmm :thinking:I’m not sure 5.1 is supported. I actually have no idea. Could you try running 5.7 in Docker?

have you tried it running 5.7 in Docker?