Skip to content

Commit

Permalink
Merge pull request #3442 from ProjectSidewalk/develop
Browse files Browse the repository at this point in the history
v7.17.0
  • Loading branch information
misaugstad authored Dec 7, 2023
2 parents 3df55ad + 6e7d58d commit 569a14d
Show file tree
Hide file tree
Showing 94 changed files with 1,199 additions and 505 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ On Windows, we recommend [Windows Powershell](https://docs.microsoft.com/en-us/p

1. Email Mikey (michaelssaugstad@gmail.com) and ask for a database dump, a Mapbox API key, and a Google Maps API key & secret (if you are not part of our team, you'll have to [create a Google Maps API key](https://developers.google.com/maps/documentation/javascript/get-api-key) yourself).
1. If your computer has an Apple Silicon (M1 or M2) chip, then you should modify the `platform` line in the `docker-compose.yml`, changing it to `linux/arm64`.
1. If your computer has less than 16 GB of RAM, I'd recommend modifying `-mem 12288` to `-mem 8192` or lower in the `package.json` file so that you don't fill up your computer's memory.
1. Modify the `MAPBOX_API_KEY`, `GOOGLE_MAPS_API_KEY`, and `GOOGLE_MAPS_SECRET` lines in the `docker-compose.yml` using the keys and secret you've acquired.
1. Modify the `SIDEWALK_CITY_ID` line in the `docker-compose.yml` to use the ID of the appropriate city, listed [here](https://github.com/ProjectSidewalk/SidewalkWebpage/wiki/Docker-Troubleshooting#first-heres-a-table-that-youll-reference-when-setting-up-your-dev-env).
1. Modify the `DATABASE_URL` line in the `docker-compose.yml`, replacing "sidewalk" with the database name from the table [linked above](https://github.com/ProjectSidewalk/SidewalkWebpage/wiki/Docker-Troubleshooting#first-heres-a-table-that-youll-reference-when-setting-up-your-dev-env).
Expand Down
10 changes: 4 additions & 6 deletions app/controllers/RouteBuilderController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ class RouteBuilderController @Inject() (implicit val env: Environment[User, Sess
submission => {
val userIdStr: String = request.identity.map(_.userId.toString).getOrElse(anonymousUser.userId)

// Save new route in the database.
val newRouteId: Int = RouteTable.save(Route(0, userIdStr, submission.regionId, "temp", public = false, deleted = false))
val newRouteStreets: Seq[RouteStreet] = submission.streetIds.zipWithIndex.map { case (streetId, index) =>
RouteStreet(0, newRouteId, streetId, firstStreet = index == 0)
}
// Save new route in the database. The order of the streets should be preserved when saving to db.
val routeId: Int = RouteTable.save(Route(0, userIdStr, submission.regionId, "temp", public = false, deleted = false))
val newRouteStreets: Seq[RouteStreet] = submission.streets.map(street => RouteStreet(0, routeId, street.streetId, street.reverse))
RouteStreetTable.saveMultiple(newRouteStreets)

Future.successful(Ok(Json.obj("route_id" -> newRouteId)))
Future.successful(Ok(Json.obj("route_id" -> routeId)))
}
)
}
Expand Down
10 changes: 8 additions & 2 deletions app/formats/json/RouteBuilderFormats.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ import play.api.libs.json.{JsPath, Reads}
import play.api.libs.functional.syntax._

object RouteBuilderFormats {
case class NewRoute(regionId: Int, streetIds: Seq[Int])
case class NewRoute(regionId: Int, streets: Seq[NewRouteStreet])
case class NewRouteStreet(streetId: Int, reverse: Boolean)

implicit val newRouteStreetReads: Reads[NewRouteStreet] = (
(JsPath \ "street_id").read[Int] and
(JsPath \ "reverse").read[Boolean]
)(NewRouteStreet.apply _)

implicit val newRouteReads: Reads[NewRoute] = (
(JsPath \ "region_id").read[Int] and
(JsPath \ "street_ids").read[Seq[Int]]
(JsPath \ "streets").read[Seq[NewRouteStreet]]
)(NewRoute.apply _)
}
2 changes: 1 addition & 1 deletion app/models/amt/AMTAssignmentTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ case class AMTAssignment(amtAssignmentId: Int, hitId: String, assignmentId: Stri
/**
*
*/
class AMTAssignmentTable(tag: Tag) extends Table[AMTAssignment](tag, Some("sidewalk"), "amt_assignment") {
class AMTAssignmentTable(tag: Tag) extends Table[AMTAssignment](tag, "amt_assignment") {
def amtAssignmentId = column[Int]("amt_assignment_id", O.PrimaryKey, O.AutoInc)
def hitId = column[String]("hit_id", O.NotNull)
def assignmentId = column[String]("assignment_id", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/attribute/ConfigTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ case class Config(openStatus: String, mapathonEventLink: Option[String], cityMap
tutorialStreetEdgeID: Int, offsetHours: Int, excludedTags: String, apiAttribute: MapParams,
apiStreet: MapParams, apiRegion: MapParams)

class ConfigTable(tag: slick.lifted.Tag) extends Table[Config](tag, Some("sidewalk"), "config") {
class ConfigTable(tag: slick.lifted.Tag) extends Table[Config](tag, "config") {
def openStatus: Column[String] = column[String]("open_status", O.NotNull)
def mapathonEventLink: Column[Option[String]] = column[Option[String]]("mapathon_event_link")
def cityCenterLat: Column[Double] = column[Double]("city_center_lat", O.NotNull)
Expand Down
4 changes: 2 additions & 2 deletions app/models/attribute/GlobalAttributeTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ case class GlobalAttributeWithLabelForAPI(val globalAttributeId: Int,
"\"[" + labelTags.mkString(",") + "]\"", "\"" + labelDescription.getOrElse("NA") + "\"", userId)
}

class GlobalAttributeTable(tag: Tag) extends Table[GlobalAttribute](tag, Some("sidewalk"), "global_attribute") {
class GlobalAttributeTable(tag: Tag) extends Table[GlobalAttribute](tag, "global_attribute") {
def globalAttributeId: Column[Int] = column[Int]("global_attribute_id", O.NotNull, O.PrimaryKey, O.AutoInc)
def globalClusteringSessionId: Column[Int] = column[Int]("global_clustering_session_id", O.NotNull)
def clusteringThreshold: Column[Float] = column[Float]("clustering_threshold", O.NotNull)
Expand Down Expand Up @@ -248,7 +248,7 @@ object GlobalAttributeTable {
| INNER JOIN global_attribute_user_attribute ON global_attribute.global_attribute_id = global_attribute_user_attribute.global_attribute_id
| INNER JOIN user_attribute_label ON global_attribute_user_attribute.user_attribute_id = user_attribute_label.user_attribute_id
| INNER JOIN label ON user_attribute_label.label_id = label.label_id
| INNER JOIN sidewalk.gsv_data ON label.gsv_panorama_id = gsv_data.gsv_panorama_id
| INNER JOIN gsv_data ON label.gsv_panorama_id = gsv_data.gsv_panorama_id
| INNER JOIN audit_task ON label.audit_task_id = audit_task.audit_task_id
| GROUP BY global_attribute.global_attribute_id, gsv_data.gsv_panorama_id
|) capture_dates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import scala.language.postfixOps

case class GlobalAttributeUserAttribute(globalAttributeUserAttributeId: Int, globalAttributeId: Int, userAttributeId: Int)

class GlobalAttributeUserAttributeTable(tag: Tag) extends Table[GlobalAttributeUserAttribute](tag, Some("sidewalk"), "global_attribute_user_attribute") {
class GlobalAttributeUserAttributeTable(tag: Tag) extends Table[GlobalAttributeUserAttribute](tag, "global_attribute_user_attribute") {
def globalAttributeUserAttributeId: Column[Int] = column[Int]("global_attribute_user_attribute_id", O.NotNull, O.PrimaryKey, O.AutoInc)
def globalAttributeId: Column[Int] = column[Int]("global_attribute_id", O.NotNull)
def userAttributeId: Column[Int] = column[Int]("user_attribute_id", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/attribute/GlobalClusteringSessionTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import scala.language.postfixOps

case class GlobalClusteringSession(globalClusteringSessionId: Int, regionId: Int, timeCreated: java.sql.Timestamp)

class GlobalClusteringSessionTable(tag: Tag) extends Table[GlobalClusteringSession](tag, Some("sidewalk"), "global_clustering_session") {
class GlobalClusteringSessionTable(tag: Tag) extends Table[GlobalClusteringSession](tag, "global_clustering_session") {
def globalClusteringSessionId: Column[Int] = column[Int]("global_clustering_session_id", O.NotNull, O.PrimaryKey, O.AutoInc)
def regionId: Column[Int] = column[Int]("region_id", O.NotNull)
def timeCreated: Column[java.sql.Timestamp] = column[java.sql.Timestamp]("time_created", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/attribute/UserAttributeLabelTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import scala.language.postfixOps

case class UserAttributeLabel(userAttributeLabelId: Int, userAttributeId: Int, labelId: Int)

class UserAttributeLabelTable(tag: Tag) extends Table[UserAttributeLabel](tag, Some("sidewalk"), "user_attribute_label") {
class UserAttributeLabelTable(tag: Tag) extends Table[UserAttributeLabel](tag, "user_attribute_label") {
def userAttributeLabelId: Column[Int] = column[Int]("user_attribute_label_id", O.NotNull, O.PrimaryKey, O.AutoInc)
def userAttributeId: Column[Int] = column[Int]("user_attribute_id", O.NotNull)
def labelId: Column[Int] = column[Int]("label_id", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/attribute/UserAttributeTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ case class UserAttribute(userAttributeId: Int,
severity: Option[Int],
temporary: Boolean)

class UserAttributeTable(tag: Tag) extends Table[UserAttribute](tag, Some("sidewalk"), "user_attribute") {
class UserAttributeTable(tag: Tag) extends Table[UserAttribute](tag, "user_attribute") {
def userAttributeId: Column[Int] = column[Int]("user_attribute_id", O.NotNull, O.PrimaryKey, O.AutoInc)
def userClusteringSessionId: Column[Int] = column[Int]("user_clustering_session_id", O.NotNull)
def clusteringThreshold: Column[Float] = column[Float]("clustering_threshold", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/attribute/UserClusteringSessionTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ case class LabelToCluster(userId: String,

case class UserClusteringSession(userClusteringSessionId: Int, userId: String, timeCreated: java.sql.Timestamp)

class UserClusteringSessionTable(tag: Tag) extends Table[UserClusteringSession](tag, Some("sidewalk"), "user_clustering_session") {
class UserClusteringSessionTable(tag: Tag) extends Table[UserClusteringSession](tag, "user_clustering_session") {
def userClusteringSessionId: Column[Int] = column[Int]("user_clustering_session_id", O.NotNull, O.PrimaryKey, O.AutoInc)
def userId: Column[String] = column[String]("user_id", O.NotNull)
def timeCreated: Column[java.sql.Timestamp] = column[java.sql.Timestamp]("time_created", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/audit/AuditTaskCommentTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ case class AuditTaskComment(auditTaskCommentId: Int, auditTaskId: Int, missionId
timestamp: Timestamp, comment: String)
case class GenericComment(commentType: String, username: String, gsvPanoramaId: Option[String], timestamp: Timestamp, comment: String, heading: Option[Double], pitch: Option[Double], zoom: Option[Int], labelId: Option[Int])

class AuditTaskCommentTable(tag: Tag) extends Table[AuditTaskComment](tag, Some("sidewalk"), "audit_task_comment") {
class AuditTaskCommentTable(tag: Tag) extends Table[AuditTaskComment](tag, "audit_task_comment") {
def auditTaskCommentId = column[Int]("audit_task_comment_id", O.PrimaryKey, O.AutoInc)
def auditTaskId = column[Int]("audit_task_id", O.NotNull)
def missionId = column[Int]("mission_id", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/audit/AuditTaskEnvironmentTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ case class AuditTaskEnvironment(auditTaskEnvironmentId: Int, auditTaskId: Int, m
screenHeight: Option[Int], operatingSystem: Option[String], ipAddress: Option[String],
language: String)

class AuditTaskEnvironmentTable(tag: Tag) extends Table[AuditTaskEnvironment](tag, Some("sidewalk"), "audit_task_environment") {
class AuditTaskEnvironmentTable(tag: Tag) extends Table[AuditTaskEnvironment](tag, "audit_task_environment") {
def auditTaskEnvironmentId = column[Int]("audit_task_environment_id", O.PrimaryKey, O.AutoInc)
def auditTaskId = column[Int]("audit_task_id", O.NotNull)
def missionId = column[Int]("mission_id", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/audit/AuditTaskIncompleteTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import scala.slick.lifted.ForeignKeyQuery

case class AuditTaskIncomplete(auditTaskIncompleteId: Int, auditTaskId: Int, missionId: Int, issueDescription: String, lat: Float, lng: Float)

class AuditTaskIncompleteTable(tag: Tag) extends Table[AuditTaskIncomplete](tag, Some("sidewalk"), "audit_task_incomplete") {
class AuditTaskIncompleteTable(tag: Tag) extends Table[AuditTaskIncomplete](tag, "audit_task_incomplete") {
def auditTaskIncompleteId = column[Int]("audit_task_incomplete_id", O.PrimaryKey, O.AutoInc)
def auditTaskId = column[Int]("audit_task_id", O.NotNull)
def missionId = column[Int]("mission_id", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/audit/AuditTaskInteractionTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ case class InteractionWithLabel(auditTaskInteractionId: Int, auditTaskId: Int, m
canvasX: Int, canvasY: Int)


class AuditTaskInteractionTable(tag: slick.lifted.Tag) extends Table[AuditTaskInteraction](tag, Some("sidewalk"), "audit_task_interaction") {
class AuditTaskInteractionTable(tag: slick.lifted.Tag) extends Table[AuditTaskInteraction](tag, "audit_task_interaction") {
def auditTaskInteractionId = column[Int]("audit_task_interaction_id", O.PrimaryKey, O.AutoInc)
def auditTaskId = column[Int]("audit_task_id", O.NotNull)
def missionId = column[Int]("mission_id", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/audit/AuditTaskTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ case class AuditedStreetWithTimestamp(streetEdgeId: Int, auditTaskId: Int,

case class StreetEdgeWithAuditStatus(streetEdgeId: Int, geom: LineString, regionId: Int, wayType: String, audited: Boolean)

class AuditTaskTable(tag: slick.lifted.Tag) extends Table[AuditTask](tag, Some("sidewalk"), "audit_task") {
class AuditTaskTable(tag: slick.lifted.Tag) extends Table[AuditTask](tag, "audit_task") {
def auditTaskId = column[Int]("audit_task_id", O.PrimaryKey, O.AutoInc)
def amtAssignmentId = column[Option[Int]]("amt_assignment_id", O.Nullable)
def userId = column[String]("user_id", O.NotNull)
Expand Down
8 changes: 4 additions & 4 deletions app/models/daos/slick/DBTableDefinitions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ object DBTableDefinitions {

case class DBUser (userId: String, username: String, email: String )

class UserTable(tag: Tag) extends Table[DBUser](tag, Some("sidewalk"), "sidewalk_user") {
class UserTable(tag: Tag) extends Table[DBUser](tag, "sidewalk_user") {
def userId = column[String]("user_id", O.PrimaryKey)
def username = column[String]("username")
def email = column[String]("email")
Expand All @@ -17,7 +17,7 @@ object DBTableDefinitions {

case class DBLoginInfo (id: Option[Long], providerID: String, providerKey: String )

class LoginInfos(tag: Tag) extends Table[DBLoginInfo](tag, Some("sidewalk"), "login_info") {
class LoginInfos(tag: Tag) extends Table[DBLoginInfo](tag, "login_info") {
def loginInfoId = column[Long]("login_info_id", O.PrimaryKey, O.AutoInc)
def providerID = column[String]("provider_id")
def providerKey = column[String]("provider_key")
Expand All @@ -26,15 +26,15 @@ object DBTableDefinitions {

case class DBUserLoginInfo (userID: String, loginInfoId: Long)

class UserLoginInfoTable(tag: Tag) extends Table[DBUserLoginInfo](tag, Some("sidewalk"), "user_login_info") {
class UserLoginInfoTable(tag: Tag) extends Table[DBUserLoginInfo](tag, "user_login_info") {
def userID = column[String]("user_id", O.NotNull)
def loginInfoId = column[Long]("login_info_id", O.NotNull)
def * = (userID, loginInfoId) <> (DBUserLoginInfo.tupled, DBUserLoginInfo.unapply)
}

case class DBPasswordInfo (hasher: String, password: String, salt: Option[String], loginInfoId: Long)

class PasswordInfoTable(tag: Tag) extends Table[DBPasswordInfo](tag, Some("sidewalk"), "user_password_info") {
class PasswordInfoTable(tag: Tag) extends Table[DBPasswordInfo](tag, "user_password_info") {
def hasher = column[String]("hasher")
def password = column[String]("password")
def salt = column[Option[String]]("salt")
Expand Down
2 changes: 1 addition & 1 deletion app/models/gallery/GalleryTaskEnvironmentTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ case class GalleryTaskEnvironment(galleryTaskEnvironmentId: Int, browser: Option
screenHeight: Option[Int], operatingSystem: Option[String], ipAddress: Option[String],
language: String, userId: Option[String])

class GalleryTaskEnvironmentTable(tag: Tag) extends Table[GalleryTaskEnvironment](tag, Some("sidewalk"), "gallery_task_environment") {
class GalleryTaskEnvironmentTable(tag: Tag) extends Table[GalleryTaskEnvironment](tag, "gallery_task_environment") {
def galleryTaskEnvironmentId = column[Int]("gallery_task_environment_id", O.PrimaryKey, O.AutoInc)
def browser = column[Option[String]]("browser", O.Nullable)
def browserVersion = column[Option[String]]("browser_version", O.Nullable)
Expand Down
2 changes: 1 addition & 1 deletion app/models/gallery/GalleryTaskInteractionTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import scala.slick.lifted.ForeignKeyQuery
case class GalleryTaskInteraction(galleryTaskInteractionId: Int, action: String, panoId: Option[String],
note: Option[String], timestamp: java.sql.Timestamp, userId: Option[String])

class GalleryTaskInteractionTable(tag: slick.lifted.Tag) extends Table[GalleryTaskInteraction](tag, Some("sidewalk"), "gallery_task_interaction") {
class GalleryTaskInteractionTable(tag: slick.lifted.Tag) extends Table[GalleryTaskInteraction](tag, "gallery_task_interaction") {
def galleryTaskInteractionId = column[Int]("gallery_task_interaction_id", O.PrimaryKey, O.AutoInc)
def action = column[String]("action", O.NotNull)
def panoId = column[Option[String]]("pano_id", O.Nullable)
Expand Down
2 changes: 1 addition & 1 deletion app/models/gsv/GSVDataTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ case class GSVData(gsvPanoramaId: String, width: Option[Int], height: Option[Int
case class GSVDataSlim(gsvPanoramaId: String, width: Option[Int], height: Option[Int], lat: Option[Float],
lng: Option[Float], cameraHeading: Option[Float], cameraPitch: Option[Float])

class GSVDataTable(tag: Tag) extends Table[GSVData](tag, Some("sidewalk"), "gsv_data") {
class GSVDataTable(tag: Tag) extends Table[GSVData](tag, "gsv_data") {
def gsvPanoramaId = column[String]("gsv_panorama_id", O.PrimaryKey)
def width = column[Option[Int]]("width")
def height = column[Option[Int]]("height")
Expand Down
2 changes: 1 addition & 1 deletion app/models/gsv/GSVLinkTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import play.api.Play.current

case class GSVLink(gsvPanoramaId: String, targetGsvPanoramaId: String, yawDeg: Double, description: String)

class GSVLinkTable(tag: Tag) extends Table[GSVLink](tag, Some("sidewalk"), "gsv_link") {
class GSVLinkTable(tag: Tag) extends Table[GSVLink](tag, "gsv_link") {
def gsvPanoramaId = column[String]("gsv_panorama_id", O.PrimaryKey)
def targetGsvPanoramaId = column[String]("target_panorama_id", O.NotNull)
def yawDeg = column[Double]("yaw_deg", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/label/LabelPointTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ case class LabelPoint(labelPointId: Int, labelId: Int, panoX: Int, panoY: Int, c
heading: Float, pitch: Float, zoom: Int, lat: Option[Float], lng: Option[Float],
geom: Option[Point], computationMethod: Option[String])

class LabelPointTable(tag: slick.lifted.Tag) extends Table[LabelPoint](tag, Some("sidewalk"), "label_point") {
class LabelPointTable(tag: slick.lifted.Tag) extends Table[LabelPoint](tag, "label_point") {
def labelPointId = column[Int]("label_point_id", O.PrimaryKey, O.AutoInc)
def labelId = column[Int]("label_id", O.NotNull)
def panoX = column[Int]("pano_x", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/label/LabelTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ case class ProjectSidewalkStats(launchDate: String, kmExplored: Float, kmExplore
nLabels: Int, severityByLabelType: Map[String, LabelSeverityStats], nValidations: Int,
accuracyByLabelType: Map[String, LabelAccuracy])

class LabelTable(tag: slick.lifted.Tag) extends Table[Label](tag, Some("sidewalk"), "label") {
class LabelTable(tag: slick.lifted.Tag) extends Table[Label](tag, "label") {
def labelId = column[Int]("label_id", O.PrimaryKey, O.AutoInc)
def auditTaskId = column[Int]("audit_task_id", O.NotNull)
def missionId = column[Int]("mission_id", O.NotNull)
Expand Down
2 changes: 1 addition & 1 deletion app/models/label/LabelTagTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import scala.slick.lifted.ForeignKeyQuery

case class LabelTag(labelTagId: Int, labelId: Int, tagId: Int)

class LabelTagTable(tagParam: slick.lifted.Tag) extends Table[LabelTag](tagParam, Some("sidewalk"), "label_tag") {
class LabelTagTable(tagParam: slick.lifted.Tag) extends Table[LabelTag](tagParam, "label_tag") {
def labelTagId: Column[Int] = column[Int]("label_tag_id", O.PrimaryKey, O.AutoInc)
def labelId: Column[Int] = column[Int]("label_id")
def tagId: Column[Int] = column[Int]("tag_id")
Expand Down
2 changes: 1 addition & 1 deletion app/models/label/LabelTypeTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import play.api.Play.current

case class LabelType(labelTypeId: Int, labelType: String, description: String)

class LabelTypeTable(tag: slick.lifted.Tag) extends Table[LabelType](tag, Some("sidewalk"), "label_type") {
class LabelTypeTable(tag: slick.lifted.Tag) extends Table[LabelType](tag, "label_type") {
def labelTypeId = column[Int]("label_type_id", O.PrimaryKey, O.AutoInc)
def labelType = column[String]("label_type", O.NotNull)
def description = column[String]("description")
Expand Down
Loading

0 comments on commit 569a14d

Please sign in to comment.