Code Monkey home page Code Monkey logo

Comments (6)

Gouttfi avatar Gouttfi commented on May 23, 2024 1

check out this comment. I believe its the same exact issue.

I ran this command npx prisma migrate resolve --applied "05_add_visit_id" and the installation then worked correctly. I specify that my data tables were empty during the installation and I repatriated my data once the installation was completed

from umami.

Gouttfi avatar Gouttfi commented on May 23, 2024

Hello,
I have exactly the same problem.
I tried to install latest version of Umami today version 2.11.2
I have mariadb database version 10.11.6
Node version 18.19.0, NPM version 9.2.0
I dont use docker

EDIT : tested with 2.11.0 and having same problem

from umami.

MiK546 avatar MiK546 commented on May 23, 2024

EDIT: See a better way to run the failing migration on MariaDB in this issue.

Seems MariaDB just doesn't implement BIN_TO_UUID right now whereas it is a built-in function in MySQL. There are polyfills for this but for some reason they produced a new error for me, so they are not completely 1-to-1 with the MySQL implementation I suppose. In the end I replaced the

BIN_TO_UUID(RANDOM_BYTES(16) & 0xffffffffffff0fff3fffffffffffffff | 0x00000000000040008000000000000000) uuid

line with

BIN_TO_UUID(UUID_TO_BIN(UUID())) uuid

with the polyfills for the two utility functions already created.

Not sure if this was a bit silly and maybe just UUID() would have sufficed, but I wanted to make sure the formatting of the VARCHAR(32) was more likely to be the same as the original MySQL code. I do not in any way guarantee this works the same way as the original code, but it seemed to work for me. After I had manually run the migration code with this change I marked the 05 migration done as per the Prisma documentation linked in the original error. Then I re-started Umami which did the rest of the migrations successfully and now seems to work fine.

I guess if Umami wanted to support MariaDB as well as MySQL they would need to replace using BIN_TO_UUID in the migration code.

from umami.

franciscao633 avatar franciscao633 commented on May 23, 2024

check out this comment. I believe its the same exact issue.

from umami.

MiK546 avatar MiK546 commented on May 23, 2024

check out this comment. I believe its the same exact issue.

Indeed it is! The author of that issue has just used the wrong error code in the title. They used the "unfinished migrations" error code of P3009 even though the body describes the same error P3018 I had. I didn't manage to find the issue because of that. This issue could be marked as a duplicate I think.

from umami.

acagastya avatar acagastya commented on May 23, 2024

npx prisma migrate resolve --applied "05_add_visit_id"

This seems to have worked for me.

from umami.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.