Comments (11)
Sorry, newbie to primeCMS here. I'm getting this error and not exactly sure on the steps to fix it. Any thoughts? Thanks
You need to create the extension uuid_ossp on the database you're using:
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
from prime.
I've been implementing this in a separated typeorm project, with an external dependency uuid and using @BeforeInsert from typeorm when creating the Entity.
just as an fyi, in case it helps you patch this temporarily, not suggesting not to use postgres add-on.
import { Entity, PrimaryColumn, Column, BeforeInsert, BaseEntity } from 'typeorm';
import { v4 } from 'uuid';
import * as bcrypt from 'bcryptjs';
@Entity('users')
export class User extends BaseEntity {
@PrimaryColumn('uuid') id: string;
@Column('varchar', { length: 255 })
firstName: string;
@Column('varchar', { length: 255 })
lastName: string;
@Column('text') email: string;
@Column('text') password: string;
@Column('boolean', { default: false })
confirmed: boolean;
@BeforeInsert()
addId() {
this.id = v4();
}
async hashPassword() {
this.password = await bcrypt.hash(this.password, 10);
}
}
from prime.
@tolumide-ng why i have to run this command? Pg dont have natively this?
from prime.
Both circleci and heroku install this by default. I would say it's almost mandatory to have uuid support in postgres today. TypeORM will attempt to enable the extension on start.
Are you guys running on windows maybe? I am all for fixing platform issues.
from prime.
Upgrading typeorm and also passing on the extra settings from the ENV db connection string. Can give this a crack in a couple days time.
from prime.
Oh.. and typeorm needs to be upgraded.
from prime.
Looks like pgcrypto extension isn't 100%
{
"message": "null value in column \"id\" violates not-null constraint",
"locations": [{
"line": 2,
"column": 3
}],
"path": ["onboard"],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"exception": {
"message": "null value in column \"id\" violates not-null constraint",
"name": "QueryFailedError",
"length": 204,
"severity": "ERROR",
"code": "23502",
"detail": "Failing row contains (null, viper@..., f, null).",
"schema": "public",
"table": "user_email",
"column": "id",
"file": "execMain.c",
"line": "2017",
"routine": "ExecConstraints",
"query": "INSERT INTO \"user_email\"(\"id\", \"address\", \"verified\", \"userId\") VALUES (DEFAULT, $1, $2, DEFAULT) RETURNING \"id\", \"verified\"",
"parameters": ["viper@....", 0]
}
}
}
EDIT:
Ignore above.. I created the DB schema with an older version of the application. I was doing some bad things which got me into that state.
Everything is working good with pgcrypto.
from prime.
I'm using the stable helm chart and install postgres on kubernetes.
The maintainers have refused to install this deprecated plugin. Which has forced TypeORM to implement a fix. Which was merged a few weeks back.
from prime.
Would you except a PR to fix?
from prime.
Absolutely! Is it a matter of just upgrading typeorm?
from prime.
Sorry, newbie to primeCMS here. I'm getting this error and not exactly sure on the steps to fix it. Any thoughts? Thanks
from prime.
Related Issues (20)
- Question: Master Detail document HOT 2
- Error: Cannot find module '@primecms/field' HOT 3
- Field select returns single value when graphql expects iterable value HOT 2
- Apollo Federation
- Question: backend HOT 2
- user.meta is not a function HOT 1
- npx @primecms/cli init
- Unable to start primecms: column cnst.consrc does not exist HOT 7
- Prime
- Separate Tables per Content Type HOT 3
- Unable to start Prime CMS HOT 1
- Consider to generalize building admin ui forms with jsonschema
- Heroku deployment fails HOT 2
- starting prime not working? HOT 1
- Compile error
- Heroku Deployment Error
- what is the purpose of serving the UI via the core? HOT 1
- Status of this project? HOT 5
- Typescript error in compiling fields
- Cannot Open/Start/View the app on Heroku
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 prime.