TypeORM attempts to create tables that already exist when its user is not the owner of that table, regardless of privilege settings
See original GitHub issueIssue type:
[ ] question [x ] bug report [ ] feature request [ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql
/ mariadb
[ ] oracle
[x ] postgres
[ ] sqlite
[ ] sqljs
[ ] websql
TypeORM version:
[x ] latest
[ ] @next
[ ] 0.x.x
(or put your version here)
Steps to reproduce or a small repository showing the problem:
- create postgres table as
user1
- grant all privileges on table to
user2
- configure typeorm to log into this db and table under login
user2
- use typeorm to query table Expected behavior: query should execute as expected without new table creation Actual behavior: query attempts to create the table as if it didn’t exist but fails because postgres returns an error stating the table already exists
- alter the table’s owner to be
user2
- use typeorm to query table Actual behavior: query does not attempt to create table, as it recognizes it already exists.
Speculation: I suspect that this is due to TypeORM only detects tables of which its configured user is the owner.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
TypeORM attempts to create tables that ... - Bountysource
TypeORM attempts to create tables that already exist when its user is not the owner of that table, regardless of privilege settings.
Read more >TypeORM does not create tables, columns etc - Stack Overflow
You can use it to create tables and columns automatically: ... synchronize: true. It creates the table once if it does not exists....
Read more >About basic forms - Power Apps | Microsoft Learn
To secure your forms, you must create table permissions that determine access and ownership of the records according to web roles. If a...
Read more >How to use single and double quotes in PostgreSQL - Prisma
Here, the table name is encapsulated in double quotes. SELECT * FROM "customer";. While double quotes indicate an identifier, not all identifiers use...
Read more >snowflake alter table - Yakkety Yak
To use Power BI to access Snowflake data through SSO, it is necessary to ... the global CREATE INTEGRATION privilege can execute The...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m experiencing the same issue. Any ideas?
Using only lowercase naming is not always an option. In my case all the tables have to camelCase naming. I already configured the
lower_case_tables_name
inmy.cnf
but that does not seem to work at all, typescritps still throws an error sayingtable systemversion already exists
(with systemversion being one of my tables)