sql update
This commit is contained in:
@@ -2,9 +2,11 @@ package ch.progetto152.repository;
|
|||||||
|
|
||||||
import ch.progetto152.entity.LocationEntity;
|
import ch.progetto152.entity.LocationEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
@Repository
|
||||||
public interface LocationRepository extends JpaRepository<LocationEntity, Long> {
|
public interface LocationRepository extends JpaRepository<LocationEntity, Long> {
|
||||||
|
|
||||||
Optional<LocationEntity> findLocationByLocation(String name);
|
Optional<LocationEntity> findLocationByLocation(String name);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use Progetto152;
|
|||||||
|
|
||||||
create table if not exists Location
|
create table if not exists Location
|
||||||
(
|
(
|
||||||
location varchar(255) not null unique,
|
location varchar(255) not null unique default '',
|
||||||
region varchar(3) not null,
|
region varchar(3) not null,
|
||||||
lat double not null,
|
lat double not null,
|
||||||
lon double not null,
|
lon double not null,
|
||||||
|
|||||||
Reference in New Issue
Block a user