Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ final case class Package(
createdAt: ZonedDateTime = ZonedDateTime.now(),
updatedAt: ZonedDateTime = ZonedDateTime.now(),
id: Int = 0,
attributes: List[ModelProperty] = Nil
attributes: List[ModelProperty] = Nil,
published: Boolean = false
)
4 changes: 3 additions & 1 deletion core/src/main/scala/com/pennsieve/db/PackagesTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ final class PackagesTable(schema: String, tag: Tag)
def attributes = column[List[ModelProperty]]("attributes")
def ownerId = column[Option[Int]]("owner_id")
def importId = column[Option[UUID]]("import_id")
def published = column[Boolean]("published")

def * =
(
Expand All @@ -79,7 +80,8 @@ final class PackagesTable(schema: String, tag: Tag)
createdAt,
updatedAt,
id,
attributes
attributes,
published
).mapTo[Package]
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE packages
ADD COLUMN published BOOLEAN NOT NULL DEFAULT false;