vapor/fluent-mysql-driver

correct foreign key enable / disable

tanner0101 opened this issue · 0 comments

    /// See `SchemaSupporting`.
    public static func enableReferences(on conn: MySQLConnection) -> Future<Void> {
        return conn.raw("SET @@session.foreign_key_checks=1").run()
    }
    
    /// See `SchemaSupporting`.
    public static func disableReferences(on conn: MySQLConnection) -> Future<Void> {
        return conn.raw("SET @@session.foreign_key_checks=0").run()
    }