The cl-migrations Reference Manual

This is the cl-migrations Reference Manual, version 0.0.3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 04:14:40 2024 GMT+0.

Table of Contents


1 Systems

The main system appears first, followed by any subsystem dependency.


1.1 cl-migrations

Version

0.0.3

Dependency

clsql (system).

Source

cl-migrations.asd.

Child Components

2 Files

Files are sorted by type and then listed depth-first from the systems components trees.


2.1 Lisp


2.1.1 cl-migrations/cl-migrations.asd

Source

cl-migrations.asd.

Parent Component

cl-migrations (system).

ASDF Systems

cl-migrations.

Packages

cl-migrations-asd.

Public Interface

*cl-migrations-version* (special variable).


2.1.2 cl-migrations/packages.lisp

Source

cl-migrations.asd.

Parent Component

cl-migrations (system).

Packages

cl-migrations.


2.1.3 cl-migrations/config.lisp

Dependency

packages.lisp (file).

Source

cl-migrations.asd.

Parent Component

cl-migrations (system).

Public Interface
Internals

2.1.4 cl-migrations/migrate.lisp

Dependency

config.lisp (file).

Source

cl-migrations.asd.

Parent Component

cl-migrations (system).

Public Interface
Internals

3 Packages

Packages are listed by definition order.


3.1 cl-migrations

Database Migrations for Common Lisp

Source

packages.lisp.

Use List
  • clsql.
  • common-lisp.
Public Interface
Internals

3.2 cl-migrations-asd

Source

cl-migrations.asd.

Use List
  • asdf/interface.
  • common-lisp.
Public Interface

*cl-migrations-version* (special variable).


4 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


4.1 Public Interface


4.1.1 Special variables

Special Variable: *cl-migrations-version*
Package

cl-migrations-asd.

Source

cl-migrations.asd.

Special Variable: *config-pathname*
Package

cl-migrations.

Source

config.lisp.


4.1.2 Ordinary functions

Function: connect-db ()
Package

cl-migrations.

Source

config.lisp.

Function: disconnect-db ()
Package

cl-migrations.

Source

config.lisp.

Function: generate (name)

Generate an empty migration file with an assigned version number.

Package

cl-migrations.

Source

migrate.lisp.

Function: migrate (&key version)

Initiate migration procedure.

Package

cl-migrations.

Source

migrate.lisp.


4.2 Internals


4.2.1 Special variables

Special Variable: *migration-dir*
Package

cl-migrations.

Source

config.lisp.

Special Variable: *schema-table-name*
Package

cl-migrations.

Source

config.lisp.

Special Variable: +all-db-types+
Package

cl-migrations.

Source

config.lisp.


4.2.2 Ordinary functions

Function: compare-files (file1 file2)
Package

cl-migrations.

Source

migrate.lisp.

Function: create-schema-table ()

Check for schema table and create if it does not exist.

Package

cl-migrations.

Source

config.lisp.

Function: db-type-spec (db-type spec)
Package

cl-migrations.

Source

config.lisp.

Function: decf-db-version ()
Package

cl-migrations.

Source

migrate.lisp.

Function: exec-migrations (db-version mig-version)

Excute all the migrations within the given range in a transaction.

Package

cl-migrations.

Source

migrate.lisp.

Function: get-db-version ()
Package

cl-migrations.

Source

migrate.lisp.

Function: get-file-range (from to)

Get the migration files within the given range, in ascending order.

Package

cl-migrations.

Source

migrate.lisp.

Function: get-latest-migration ()

Get the version of latest migration available.

Package

cl-migrations.

Source

migrate.lisp.

Function: get-migration-files ()

Get all files from the migrations directory, and sort them numerically.

Package

cl-migrations.

Source

migrate.lisp.

Function: get-migration-number (file)
Package

cl-migrations.

Source

migrate.lisp.

Function: incf-db-version ()
Package

cl-migrations.

Source

migrate.lisp.

Function: init-config (&optional clean)

Load database configuration and create a connection if none exists.

Package

cl-migrations.

Source

config.lisp.

Function: init-connection (db-type spec &optional clean)

Connect to the database; Truncate database if clean flag is set.

Package

cl-migrations.

Source

config.lisp.

Function: load-necessary-systems (spec &optional clean)

Load the matching database type

Package

cl-migrations.

Source

config.lisp.

Function: read-specs (&optional path)

Read database and migrations directory specs and set respective variables.

Package

cl-migrations.

Source

config.lisp.

Function: select-migration-files (db-version mig-version)

Return migration files in ascending or descending order based on whether migrating up or down respectively.

Package

cl-migrations.

Source

migrate.lisp.

Function: spec-fn (db-type)
Package

cl-migrations.

Source

config.lisp.


4.2.3 Generic functions

Generic Reader: aodbc-spec (object)
Package

cl-migrations.

Methods
Reader Method: aodbc-spec ((conn-specs conn-specs))

automatically generated reader method

Source

config.lisp.

Target Slot

aodbc.

Generic Writer: (setf aodbc-spec) (object)
Package

cl-migrations.

Methods
Writer Method: (setf aodbc-spec) ((conn-specs conn-specs))

automatically generated writer method

Source

config.lisp.

Target Slot

aodbc.

Generic Reader: mysql-spec (object)
Package

cl-migrations.

Methods
Reader Method: mysql-spec ((conn-specs conn-specs))

automatically generated reader method

Source

config.lisp.

Target Slot

mysql.

Generic Writer: (setf mysql-spec) (object)
Package

cl-migrations.

Methods
Writer Method: (setf mysql-spec) ((conn-specs conn-specs))

automatically generated writer method

Source

config.lisp.

Target Slot

mysql.

Generic Reader: odbc-spec (object)
Package

cl-migrations.

Methods
Reader Method: odbc-spec ((conn-specs conn-specs))

automatically generated reader method

Source

config.lisp.

Target Slot

odbc.

Generic Writer: (setf odbc-spec) (object)
Package

cl-migrations.

Methods
Writer Method: (setf odbc-spec) ((conn-specs conn-specs))

automatically generated writer method

Source

config.lisp.

Target Slot

odbc.

Generic Reader: oracle-spec (object)
Package

cl-migrations.

Methods
Reader Method: oracle-spec ((conn-specs conn-specs))

automatically generated reader method

Source

config.lisp.

Target Slot

oracle.

Generic Writer: (setf oracle-spec) (object)
Package

cl-migrations.

Methods
Writer Method: (setf oracle-spec) ((conn-specs conn-specs))

automatically generated writer method

Source

config.lisp.

Target Slot

oracle.

Generic Reader: postgresql-socket-spec (object)
Package

cl-migrations.

Methods
Reader Method: postgresql-socket-spec ((conn-specs conn-specs))

automatically generated reader method

Source

config.lisp.

Target Slot

postgresql-socket.

Generic Writer: (setf postgresql-socket-spec) (object)
Package

cl-migrations.

Methods
Writer Method: (setf postgresql-socket-spec) ((conn-specs conn-specs))

automatically generated writer method

Source

config.lisp.

Target Slot

postgresql-socket.

Generic Reader: postgresql-spec (object)
Package

cl-migrations.

Methods
Reader Method: postgresql-spec ((conn-specs conn-specs))

automatically generated reader method

Source

config.lisp.

Target Slot

postgresql.

Generic Writer: (setf postgresql-spec) (object)
Package

cl-migrations.

Methods
Writer Method: (setf postgresql-spec) ((conn-specs conn-specs))

automatically generated writer method

Source

config.lisp.

Target Slot

postgresql.

Generic Reader: sqlite-spec (object)
Package

cl-migrations.

Methods
Reader Method: sqlite-spec ((conn-specs conn-specs))

automatically generated reader method

Source

config.lisp.

Target Slot

sqlite.

Generic Writer: (setf sqlite-spec) (object)
Package

cl-migrations.

Methods
Writer Method: (setf sqlite-spec) ((conn-specs conn-specs))

automatically generated writer method

Source

config.lisp.

Target Slot

sqlite.

Generic Reader: sqlite3-spec (object)
Package

cl-migrations.

Methods
Reader Method: sqlite3-spec ((conn-specs conn-specs))

automatically generated reader method

Source

config.lisp.

Target Slot

sqlite3.

Generic Writer: (setf sqlite3-spec) (object)
Package

cl-migrations.

Methods
Writer Method: (setf sqlite3-spec) ((conn-specs conn-specs))

automatically generated writer method

Source

config.lisp.

Target Slot

sqlite3.


4.2.4 Classes

Class: conn-specs

Connection specs for CLSQL for different databases

Package

cl-migrations.

Source

config.lisp.

Direct methods
Direct slots
Slot: aodbc
Readers

aodbc-spec.

Writers

(setf aodbc-spec).

Slot: mysql
Readers

mysql-spec.

Writers

(setf mysql-spec).

Slot: postgresql
Readers

postgresql-spec.

Writers

(setf postgresql-spec).

Slot: postgresql-socket
Readers

postgresql-socket-spec.

Writers

(setf postgresql-socket-spec).

Slot: sqlite
Readers

sqlite-spec.

Writers

(setf sqlite-spec).

Slot: sqlite3
Readers

sqlite3-spec.

Writers

(setf sqlite3-spec).

Slot: odbc
Readers

odbc-spec.

Writers

(setf odbc-spec).

Slot: oracle
Readers

oracle-spec.

Writers

(setf oracle-spec).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   C   D   E   F   G   I   L   M   O   P   R   S  
Index Entry  Section

(
(setf aodbc-spec): Private generic functions
(setf aodbc-spec): Private generic functions
(setf mysql-spec): Private generic functions
(setf mysql-spec): Private generic functions
(setf odbc-spec): Private generic functions
(setf odbc-spec): Private generic functions
(setf oracle-spec): Private generic functions
(setf oracle-spec): Private generic functions
(setf postgresql-socket-spec): Private generic functions
(setf postgresql-socket-spec): Private generic functions
(setf postgresql-spec): Private generic functions
(setf postgresql-spec): Private generic functions
(setf sqlite-spec): Private generic functions
(setf sqlite-spec): Private generic functions
(setf sqlite3-spec): Private generic functions
(setf sqlite3-spec): Private generic functions

A
aodbc-spec: Private generic functions
aodbc-spec: Private generic functions

C
compare-files: Private ordinary functions
connect-db: Public ordinary functions
create-schema-table: Private ordinary functions

D
db-type-spec: Private ordinary functions
decf-db-version: Private ordinary functions
disconnect-db: Public ordinary functions

E
exec-migrations: Private ordinary functions

F
Function, compare-files: Private ordinary functions
Function, connect-db: Public ordinary functions
Function, create-schema-table: Private ordinary functions
Function, db-type-spec: Private ordinary functions
Function, decf-db-version: Private ordinary functions
Function, disconnect-db: Public ordinary functions
Function, exec-migrations: Private ordinary functions
Function, generate: Public ordinary functions
Function, get-db-version: Private ordinary functions
Function, get-file-range: Private ordinary functions
Function, get-latest-migration: Private ordinary functions
Function, get-migration-files: Private ordinary functions
Function, get-migration-number: Private ordinary functions
Function, incf-db-version: Private ordinary functions
Function, init-config: Private ordinary functions
Function, init-connection: Private ordinary functions
Function, load-necessary-systems: Private ordinary functions
Function, migrate: Public ordinary functions
Function, read-specs: Private ordinary functions
Function, select-migration-files: Private ordinary functions
Function, spec-fn: Private ordinary functions

G
generate: Public ordinary functions
Generic Function, (setf aodbc-spec): Private generic functions
Generic Function, (setf mysql-spec): Private generic functions
Generic Function, (setf odbc-spec): Private generic functions
Generic Function, (setf oracle-spec): Private generic functions
Generic Function, (setf postgresql-socket-spec): Private generic functions
Generic Function, (setf postgresql-spec): Private generic functions
Generic Function, (setf sqlite-spec): Private generic functions
Generic Function, (setf sqlite3-spec): Private generic functions
Generic Function, aodbc-spec: Private generic functions
Generic Function, mysql-spec: Private generic functions
Generic Function, odbc-spec: Private generic functions
Generic Function, oracle-spec: Private generic functions
Generic Function, postgresql-socket-spec: Private generic functions
Generic Function, postgresql-spec: Private generic functions
Generic Function, sqlite-spec: Private generic functions
Generic Function, sqlite3-spec: Private generic functions
get-db-version: Private ordinary functions
get-file-range: Private ordinary functions
get-latest-migration: Private ordinary functions
get-migration-files: Private ordinary functions
get-migration-number: Private ordinary functions

I
incf-db-version: Private ordinary functions
init-config: Private ordinary functions
init-connection: Private ordinary functions

L
load-necessary-systems: Private ordinary functions

M
Method, (setf aodbc-spec): Private generic functions
Method, (setf mysql-spec): Private generic functions
Method, (setf odbc-spec): Private generic functions
Method, (setf oracle-spec): Private generic functions
Method, (setf postgresql-socket-spec): Private generic functions
Method, (setf postgresql-spec): Private generic functions
Method, (setf sqlite-spec): Private generic functions
Method, (setf sqlite3-spec): Private generic functions
Method, aodbc-spec: Private generic functions
Method, mysql-spec: Private generic functions
Method, odbc-spec: Private generic functions
Method, oracle-spec: Private generic functions
Method, postgresql-socket-spec: Private generic functions
Method, postgresql-spec: Private generic functions
Method, sqlite-spec: Private generic functions
Method, sqlite3-spec: Private generic functions
migrate: Public ordinary functions
mysql-spec: Private generic functions
mysql-spec: Private generic functions

O
odbc-spec: Private generic functions
odbc-spec: Private generic functions
oracle-spec: Private generic functions
oracle-spec: Private generic functions

P
postgresql-socket-spec: Private generic functions
postgresql-socket-spec: Private generic functions
postgresql-spec: Private generic functions
postgresql-spec: Private generic functions

R
read-specs: Private ordinary functions

S
select-migration-files: Private ordinary functions
spec-fn: Private ordinary functions
sqlite-spec: Private generic functions
sqlite-spec: Private generic functions
sqlite3-spec: Private generic functions
sqlite3-spec: Private generic functions