Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
Resin
Server
Commits
507fd3f1
Commit
507fd3f1
authored
9 months ago
by
Etienne LOUPIAS
Browse files
Options
Downloads
Plain Diff
Merge branch '579-cartographie-filtres-cartographie' into 'dev'
579 cartographie filtres cartographie See merge request
!403
parents
28c62d99
e701ec23
Loading
Loading
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/migrations/scripts/1716993738507-add-category-appointment-filter.ts
+32
-0
32 additions, 0 deletions
.../scripts/1716993738507-add-category-appointment-filter.ts
with
32 additions
and
0 deletions
src/migrations/scripts/1716993738507-add-category-appointment-filter.ts
0 → 100644
+
32
−
0
View file @
507fd3f1
import
{
getDb
}
from
'
../migrations-utils/db
'
;
export
const
up
=
async
()
=>
{
try
{
const
db
=
await
getDb
();
const
newCategory
=
{
modules
:
[
{
id
:
'
True
'
,
name
:
'
hasUserWithAppointmentDN
'
,
},
],
name
:
'
Demande de RDV
'
,
theme
:
'
Pas de modale
'
,
id
:
'
hasUserWithAppointmentDN
'
,
};
await
db
.
collection
(
'
categories
'
).
insertOne
(
newCategory
);
console
.
log
(
`Update done: New category 'hasUserWithAppointmentDN' added successfully.`
);
}
catch
(
error
)
{
console
.
error
(
`Error while creating the new category 'hasUserWithAppointmentDN':`
,
error
);
}
};
export
const
down
=
async
()
=>
{
try
{
const
db
=
await
getDb
();
await
db
.
collection
(
'
categories
'
).
deleteOne
({
id
:
'
hasUserWithAppointmentDN
'
});
console
.
log
(
`Downgrade done: removed the 'hasUserWithAppointmentDN' category.`
);
}
catch
(
error
)
{
console
.
error
(
`Error while removing the 'hasUserWithAppointmentDN' category:`
,
error
);
}
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment