Comments (6)
Hi @zplzpl
What do you mean by optimizing the names ?
Daptin manages the table names, column names, relationship table names (for many to many), index names, foreign key names internally so that they don't clash with each other.
The table name you mentioned is a join table (a user otp account can belong to multiple user groups). Join table names follow this convection:
<SubjectTableName>_<SubjectColumnName>_has_<ObjectTableName>_<ObjectColumnName>
from daptin.
Is the name generation rule configurable?
from daptin.
The name generation rule for join tables isn't configurable as of now.
How would you have configured it. What kind of configuration are you looking for. Only join table names are generated and join tables are not usually directly accessed. If you are facing some other issue because of names, do bring it up.
from daptin.
It's too long for me
from daptin.
Do you have a better approach for the names ? The join table names are long for my taste as well but this is the only way I see to avoid any conflicts.
Consider the case when there can be multiple many to many joins between two tables or even a self join.
Lets say you have table t1 and t2, each with 2 columns: col1 and col2. Now we make a many to many join table for these two tables on t1.col1 = t2.col2. What would you name the join table for this ?
from daptin.
@zplzpl The join table names are configurable. Like I mentioned the join table name structure, when defining a relation, you can set the 4 params:
- Subject: <Table>
SubjectName: defaults to <Table>_id
Object: <OtherTable>
ObjectName: defaults to <OtherTable>_id
You will need to ensure there are no conflicts when defining multiple relations, as the subject_name and object_name also become part of the exposed API.
from daptin.
Related Issues (20)
- Heroku deployment HOT 1
- Unable to create user or log in via dashboard HOT 3
- `s and `project`s
- Web dashboard fails to open in v0.9.5 HOT 5
- Update multiple rows by where clause
- arm64 release please HOT 4
- 096version with mysql "panic: interface conversion: interface {} is []uint8, not int64" HOT 1
- The start up example not works: "Create a site using a google drive folder" and "Creating a todo list backend" HOT 7
- About License HOT 8
- enable when caldav is ready
- [SQLite] Failed to create new item - {"0":{"title":"database is locked"}} HOT 2
- Docs for smtp/imap server HOT 6
- Is daptin still go gettable? HOT 4
- broken html, css, js (dashboard does not work) HOT 7
- Old latest image tag on docker hub HOT 1
- CWE-613: Insufficient Session Expiration
- Native binary for the latest release (0.9.9) HOT 11
- [Deploy Question]Could the official image in docker hub provide arm64 branch? HOT 8
- Build from Source 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 daptin.