Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WebBack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
websystem
WebBack
Merge requests
!19
미팅방 서비스 관련 검증 로직 보강 및 트랜잭션 적용
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
미팅방 서비스 관련 검증 로직 보강 및 트랜잭션 적용
feature/#12
into
develop
Overview
0
Commits
2
Pipelines
0
Changes
24
Merged
세현 임
requested to merge
feature/#12
into
develop
3 months ago
Overview
0
Commits
2
Pipelines
0
Changes
24
Expand
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
b3bea64d
2 commits,
3 months ago
24 files
+
11817
−
7288
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
24
Search (e.g. *.vue) (Ctrl+P)
config/sequelize.js
+
11
−
10
Options
// config/sequelize.js
//
src/
config/sequelize.js
const
{
Sequelize
}
=
require
(
'
sequelize
'
);
require
(
'
dotenv
'
).
config
();
const
sequelize
=
new
Sequelize
(
process
.
env
.
DB_NAME
,
process
.
env
.
DB_USER
,
process
.
env
.
DB_PASSWORD
,
{
host
:
process
.
env
.
DB_HOST
,
dialect
:
'
mysql
'
,
// 사용하려는 DBMS에 맞게 변경
logging
:
false
,
define
:
{
//timestamps: true, // createdAt, updatedAt 자동 생성
underscored
:
true
,
// created_at 형식의 필드명 사용
},
});
const
isTest
=
process
.
env
.
NODE_ENV
===
'
test
'
;
const
sequelize
=
isTest
?
new
Sequelize
(
'
sqlite::memory:
'
,
{
logging
:
false
})
// 테스트 환경용 인메모리 DB
:
new
Sequelize
(
process
.
env
.
DB_NAME
,
process
.
env
.
DB_USER
,
process
.
env
.
DB_PASSWORD
,
{
host
:
process
.
env
.
DB_HOST
,
dialect
:
'
mysql
'
,
logging
:
false
,
});
module
.
exports
=
sequelize
;
\ No newline at end of file
Loading