-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 Bug: Deployment Failure when migrating from 0.111.1 to 0.202.5 (Railway) - "Migration from 0108002 to 0111002 failed", Relation aready exists #6826
Comments
I've few queries which will be helpful to debug more
SELECT
f.attname AS cn,
i.relname as key_name,
ix.indnatts, ix.indkey, f.attnum as seq_in_index,
pg_catalog.format_type(f.atttypid,f.atttypmod) AS type,
f.attnotnull as rqd,
p.contype as cst,
p.conname as cstn,
CASE
WHEN i.oid<>0 THEN true
ELSE false
END AS is_index,
CASE
WHEN p.contype = 'p' THEN true
ELSE false
END AS primarykey,
CASE
WHEN p.contype = 'u' THEN 0
WHEN p.contype = 'p' THEN 0
ELSE 1
END AS non_unique_original,
CASE
WHEN p.contype = 'p' THEN true
ELSE false
END AS primarykey,
CASE
WHEN p.contype = 'u' THEN 0
WHEN p.contype = 'p' THEN 0
ELSE 1
END AS non_unique,
CASE
WHEN f.atthasdef = 't' THEN pg_get_expr(d.adbin, d.adrelid)
END AS default FROM pg_attribute f
JOIN pg_class c ON c.oid = f.attrelid
JOIN pg_type t ON t.oid = f.atttypid
LEFT JOIN pg_attrdef d ON d.adrelid = c.oid AND d.adnum = f.attnum
LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
LEFT JOIN pg_constraint p ON p.conrelid = c.oid AND f.attnum = ANY (p.conkey)
LEFT JOIN pg_class AS g ON p.confrelid = g.oid
LEFT JOIN pg_index AS ix ON f.attnum = ANY(ix.indkey) and c.oid = f.attrelid and c.oid = ix.indrelid
LEFT JOIN pg_class AS i ON ix.indexrelid = i.oid
WHERE
c.relkind = 'r'::char
AND n.nspname = 'public'
AND c.relname = 'nc_goya__nc_m2m_rv6ot3ewwh'
and i.oid<>0
AND f.attnum > 0
ORDER BY i.relname, f.attnum; |
Can you share the result of the query, which will help us to figure out the root cause. @candideu : sorry I'd accidentally deleted your comment. |
@pranavxc There weren't any particular results, it just said "successful" and "No data to display, table is empty.". Would the results show up, anywhere in the tables? |
@candideu : We are using that query for getting indexes for a particular table but it seems not returning anything and which causing the issue. One more query, are you using a different schema other than default |
I'm not sure... Schema-wise, I'm using this Dockerfile, so I don't think it's different. Permission-wise: Let me ask the Railway team. |
Also, I ran the query again in Railway and it said, "No data to display, table is empty." I can try again withthe Postgres desktop app, if you think that would produce different results. |
Based on what I've been told by a Railway community member, the permissions should be the same as what is included in the dockerfile: https://github.com/railwayapp-templates/postgres-ssl/blob/main/Dockerfile.latest
|
Can you run following query and share the result
|
Unfortunately, I'm still running into issues with this deployment. See: #7242 |
Please confirm if bug report does NOT exists already ?
Steps to reproduce ?
When adapting to upgrade Nocodb on Railway from 0.111.1 to 0.202.5, my deployment crashed.
Here are some error messages I've extracted from the Deployment logs:
Desired Behavior
After redeploying, deployment works as it did before.
Project Details
Deployment: Railway
Version: 0.202.5
Database: Postgres
Attachments
No response
The text was updated successfully, but these errors were encountered: