Skip to content

Commit

Permalink
fix: Place의 google_place_id를 nullable하게 변경 #211
Browse files Browse the repository at this point in the history
  • Loading branch information
koomchang committed Nov 30, 2024
1 parent b97c314 commit 602a0e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions backend/resources/sql/DDL.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ CREATE TABLE USER
CREATE TABLE PLACE
(
id INT PRIMARY KEY AUTO_INCREMENT,
google_place_id CHAR(50) UNIQUE NOT NULL,
name VARCHAR(255) NOT NULL,
google_place_id CHAR(50) UNIQUE,
name VARCHAR(255) NOT NULL,
thumbnail_url VARCHAR(255),
rating DECIMAL(3, 2),
longitude DECIMAL(10, 7), -- 경도
Expand All @@ -46,7 +46,7 @@ CREATE TABLE PLACE
detail_page_url VARCHAR(255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
deleted_at TIMESTAMP NULL
deleted_at TIMESTAMP NULL
);

-- MAP 테이블
Expand Down
4 changes: 2 additions & 2 deletions backend/src/place/entity/place.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Category } from '@src/place/place.category.enum';

@Entity()
export class Place extends BaseEntity {
@Column({ unique: true })
googlePlaceId: string;
@Column({ unique: true, nullable: true })
googlePlaceId?: string;

@Column()
name: string;
Expand Down

0 comments on commit 602a0e1

Please sign in to comment.