Comments (3)
@chrisknoll @m0nhawk the migration to fix this could be something like:
SELECT setval('sec_permission_sequence', (select max(id)+1 from sec_permission), false);
DROP SEQUENCE ohdsi.sec_permission_seq;
from webapi.
Found the same thing! When I was going through he performance optimization PR, I was looking where permissions were created (sec_permission) and noticed that there's 2 sequences (this is found in my pgAdmin for my local env):
sec_permission_id_seq
sec_permission_sequence
(These are the two that you pionted out above).
Where'd they come from? To find out, I looked at postgres migration scripts and searched for each:
sec_permission_sequence
was introduced in migration V1.0.0.9__shrio_security.sql
sec_permission_id_seq
was introduced in migration V1.0.11.0_data-cojhort-analysis-permission.
I'm not sure why the latter introduced a new sequence, but probably a developer error where they didn't see it.
But the sec_permission_id_seq
is the one used in our JPA entity definition, so that's the only one that matters.
It's unfortunate about that because the naming convention that is used isn't the one we would want: the sequence name should be {table}_sequence (or _seq is also used).
I think the fix here is to introduce a migration that will drop the un-used sequence.
from webapi.
Right, but dropping sec_permission_id_seq
, but also updating the Entity definition to use the sec_permission_sequence. I think those 2 steps would do it.
from webapi.
Related Issues (20)
- has[Write|Read]Access does not use wildcard permissions HOT 1
- WebAPI 3.0 Change List HOT 3
- Incorrectly redirects on login via nginx reverse proxy HOT 3
- Memory Usage WebAPI HOT 3
- Provide configuration option to disable source connection checks HOT 2
- Error fetching generations for CohortPathways HOT 1
- Illegal Annotation Exception HOT 5
- Incorrect CohortPathway result when creating non-overlapping cohorts for analysis. HOT 1
- OHDSI WebAPI JDBC Driver Connectivity Issues With DATABRICKS HOT 9
- Cannot open ports on Tomcat HOT 1
- AtlasRegularSecurity breaks connection to WebAPI HOT 4
- CDM session credential pass-through.
- Add support for Team level authorization in Atlas/WebAPI HOT 2
- Proposal: Profiles section - compatibility with bigints types HOT 2
- Fix PermissionTest.java tests
- Fix CohortCharacterizationServiceTest.java tests
- Fix SecurityIT.java Integration Tests
- Upgrade Snowflake JDBC to v3.17.0
- The Korean sentence order in Authorship description is incorrect.
- Implement Caching for Permissions and asset lists
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webapi.