umami-software / migrate-v1-v2

Script for migrating data from Umami v1 to v2
MIT License
1 stars 7 forks source link

Database v1 tables not detected #3

Open nickradford opened 1 year ago

nickradford commented 1 year ago

I'm trying to upgrade from umami-software/umami@0cb14f3 (v 1.38 or so) to latest umami-software/umami@71bb012, but when running this migration tool, I'm seeing the following error.

image

The tables I have in supabase are as follows: image.

Upon reviewing the code, it seems to require a v1_account table and a 04_add_uuid migration. However, the table named account exists and only three migrations (01_init, 02_add_event_data, and 03_remove_cascade_delete) have been executed.

Full Schema Below

table_name column_name data_type
_event_old website_id integer
_event_old created_at timestamp with time zone
_event_old event_id integer
_event_old event_value character varying
_event_old url character varying
_event_old session_id integer
_event_old event_type character varying
_prisma_migrations finished_at timestamp with time zone
_prisma_migrations started_at timestamp with time zone
_prisma_migrations migration_name character varying
_prisma_migrations checksum character varying
_prisma_migrations logs text
_prisma_migrations applied_steps_count integer
_prisma_migrations rolled_back_at timestamp with time zone
_prisma_migrations id character varying
account is_admin boolean
account updated_at timestamp with time zone
account created_at timestamp with time zone
account user_id integer
account username character varying
account password character varying
event session_id integer
event event_name character varying
event event_id integer
event url character varying
event website_id integer
event created_at timestamp with time zone
event_data event_data_id integer
event_data event_data jsonb
event_data event_id integer
pageview session_id integer
pageview created_at timestamp with time zone
pageview website_id integer
pageview view_id integer
pageview url character varying
pageview referrer character varying
session screen character varying
session os character varying
session created_at timestamp with time zone
session session_id integer
session session_uuid uuid
session language character varying
session website_id integer
session country character
session device character varying
session hostname character varying
session browser character varying
website website_id integer
website website_uuid uuid
website share_id character varying
website domain character varying
website created_at timestamp with time zone
website name character varying
website user_id integer
mgolub2 commented 1 year ago

I had the same error, I managed to solve it by upgrading to 1.40.0 first, then running the migration script.

MagmaBlock commented 1 year ago

I had the same error too. After a long time debug, I found MySQL user used for umami don't have permission of DROP command. OMG, why the migrator only print a Database v1 tables have not been detected., there is more error details needed

ahopkins commented 11 months ago

I had the same error, I managed to solve it by upgrading to 1.40.0 first, then running the migration script.

How do I do that? I changed the just from 1.33 to 1.40 and there seems to be some missing migrations. How do I run those?

saravanapriyanm commented 5 months ago

For anyone trying to migrate to 1.4 from previous versions, checkout the V1 branch and do yarn install and yarn build.