Skip to content

Commit 0a90f60

Browse files
committed
Renamed "c_uid" and "u_uid" to "created_by" and "updated_by".
1 parent 00d1c42 commit 0a90f60

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ const config = {
2828
uploadPath: "../evolutility-ui-react/public/pix/",
2929

3030
// - Optional fields
31-
// - Timestamp columns created_at and updated_at w/ date of record creation and last update
31+
// - Timestamp columns "created_at" and "updated_at" w/ date of record creation and last update
3232
wTimestamp: true,
33-
// - "WhoIs" columns u_uid and c_uid w/ userid of creator and last modifier
33+
// - "WhoIs" columns "created_by" and "updated_by" w/ userid of creator and last modifier
3434
wWhoIs: false,
3535
// - Comments & Ratings (community feature)
3636
wComments: false,

js/setup/database.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,14 @@ const ft_postgreSQL = {
4949
json: "json",
5050
};
5151

52+
const createdDateCol = config.createdDateColumn || "created_at";
53+
const updatedDateCol = config.updatedDateColumn || "update_at";
54+
5255
const sysColumns = {
53-
c_date: true,
54-
u_date: true,
55-
c_uid: true,
56-
u_uid: true,
56+
[createdDateCol]: true,
57+
[updatedDateCol]: true,
58+
created_by: true,
59+
updated_by: true,
5760
nb_comments: true,
5861
nb_ratings: true,
5962
avg_ratings: true,
@@ -337,8 +340,8 @@ function sqlModel(mid) {
337340
}
338341
// - "who-is" columns to track user who created and last modified the record.
339342
if (config.wWhoIs) {
340-
fs.push(" c_uid integer");
341-
fs.push(" u_uid integer");
343+
fs.push(" created_by integer");
344+
fs.push(" updated_by integer");
342345
}
343346

344347
// - tracking number of comments.

js/utils/dico.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ if (config.wWhoIs) {
6060
{
6161
// - record creator (user.id)
6262
type: "integer",
63-
column: "c_uid",
63+
column: "created_by",
6464
},
6565
{
6666
// - record last editor (user.id)
6767
type: "integer",
68-
column: "u_uid",
68+
column: "updated_by",
6969
}
7070
);
7171
}

0 commit comments

Comments
 (0)