module Memo::Migration

Overview

Converts a database written by an earlier version of memo, once. The version a database is at is kept in memo_meta.

Extended Modules

Defined in:

memo/migration.cr

Constant Summary

SCHEMA_VERSION = 1

1 (memo 0.13): each distinct text is stored once, in memo_contents, and sources and chunks point at it. Databases from before have no version.

Instance Method Summary

Instance Method Detail

def run(db : DB::Database) : Nil #

Runs in one transaction, so a failure leaves the database as it was. A second process opening the database meanwhile waits for it.


[View source]
def version(db : DBHandle) : Int32 #

[View source]