Comments (7)
I'll take a look at it, let's keep this issue open for now. In the meantime you can fix the varchar(null)
by hand. As for the missing pk
, the script is very optimistic, and for some reason it doesn't find your table's pk and in this case you should set it by hand.
You can start the admin with
$ admin -l path/to/config
to log the queries that are issued. Right now the system queries responsible for setting up the settings.json
file are not logged out (they are issued in lib/db/database.js and lib/db/schema.js so you can log them out as well)
from express-admin.
Also @aol-nnov I don't thing this will work
"defaultValue": "uuid_generate_v4()"
You should set the defaultValue
to null
and hide the column from the editview, as I'm understanding this value is generated in your database when the record is created.
from express-admin.
@simov, that's exactly what i did - filled in by hand and it worked ;)
just reporting in :)
and as for uuid fields - they may be generated on the application side, as well as on db side if left empty. Yes, I have already to changed defaultValue
to null
in express-admin.
from express-admin.
If you intend to set values on the application side automatically use the events
You can take a look at how I generate a unique id and set it here
There isn't documentation about the exact structure of args
in this 'event' but you can run the admin with --debug-brk
flag and use node-inspector to see what's the data in it. As you can see there is a breakpoint on top of this function already.
from express-admin.
thank you for a hint, I'll look into it!
from express-admin.
One more example of the events can be found in the examples repository. In both cases you can open up the model file with MySql Workbench to see how the tables are visually constructed, then take a look at the configuration that is used in the admin. The structure of the example databases is identical for each database engine.
from express-admin.
@aol-nnov I just published a new version, so make an npm install
, it's not related to this issue, but still it's important to re-install the admin
from express-admin.
Related Issues (20)
- nsp security issues HOT 1
- Store comma seperated values for a single column.
- Passing parameters to /add in order to prevalue fields
- mysql insert operation not working in -v (development, no login) mode HOT 1
- Time is not shown correctlly for mysql db HOT 1
- Unhandled exception when paginating empty resultsets
- Ajax call not working
- Error creating entry with many to many relationship
- crashes under Firefox Quantum 62.0 (64-bit) under OSX
- Support for postgres data type json? HOT 4
- ERROR! Could not find `pg` or `pg.js` module HOT 1
- Can this be used with hapijs? HOT 1
- PG setup via connection string
- Datepicker saving timezone with timestamp HOT 1
- Empty one to Many HOT 4
- Filter in tables throw internal server error HOT 1
- Password authentication fails for Postgres (11) connections HOT 4
- Flash of unstyled content HOT 3
- how to configure server using nodemon HOT 1
- what is mean for this error HOT 1
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 express-admin.