Migration

io.eezo.db.migrate.Migration
See theMigration companion class
object Migration

Attributes

Companion
class
Source
Migration.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Migration.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def fingerprint(statements: List[String]): String

Attributes

Source
Migration.scala
def parse(content: String): Option[(String, List[String])]

The statements a migration file holds, and the fingerprint it declares.

The statements a migration file holds, and the fingerprint it declares.

Two candidate splits are offered, and the declared fingerprint chooses between them: the scanned one, which knows about quoting, and the plain one this method used before it knew anything. The scanned split wins when it matches, the plain split is taken when the scanned one does not match and it does, and when neither matches the scanned one is returned so that verify reports the mismatch it would have reported anyway. A file that verified under the plain split therefore still verifies, whatever the scanner makes of its quoting.

The plain split still sees every line that begins with -- removed first, which is the reading a file written before the scanner knew about quotes was checked against. The scanned split sees that same text, line endings normalised to \n, and drops such a line only when it starts outside a literal, a quoted identifier, a dollar quote, and a block comment.

A backslash escaped quote is still not understood, and a ; inside a -- comment's own text still cuts. The second is deliberate: render writes the terminator of a statement that ends in a comment on that same line, so a ; there has to end the statement.

Attributes

Source
Migration.scala
def verify(content: String): Either[String, List[String]]

Attributes

Source
Migration.scala