The cl-migrations Reference Manual
Table of Contents
The cl-migrations Reference Manual
This is the cl-migrations Reference Manual, version 0.0.3,
generated automatically by Declt version 3.0 "Montgomery Scott"
on Mon Apr 19 15:02:39 2021 GMT+0.
1 Systems
The main system appears first, followed by any subsystem dependency.
1.1 cl-migrations
- Version
0.0.3
- Dependency
clsql
- Source
cl-migrations.asd (file)
- 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.asd
- Location
cl-migrations.asd
- Systems
cl-migrations (system)
- Packages
cl-migrations-asd
- Exported Definitions
*cl-migrations-version* (special variable)
2.1.2 cl-migrations/packages.lisp
- Parent
cl-migrations (system)
- Location
packages.lisp
- Packages
cl-migrations
2.1.3 cl-migrations/config.lisp
- Dependency
packages.lisp (file)
- Parent
cl-migrations (system)
- Location
config.lisp
- Exported Definitions
-
- Internal Definitions
-
2.1.4 cl-migrations/migrate.lisp
- Dependency
config.lisp (file)
- Parent
cl-migrations (system)
- Location
migrate.lisp
- Exported Definitions
-
- Internal Definitions
-
3 Packages
Packages are listed by definition order.
3.1 cl-migrations-asd
- Source
cl-migrations.asd
- Use List
- asdf/interface
- common-lisp
- Exported Definitions
*cl-migrations-version* (special variable)
3.2 cl-migrations
Database Migrations for Common Lisp
- Source
packages.lisp (file)
- Use List
-
- Exported Definitions
-
- Internal Definitions
-
4 Definitions
Definitions are sorted by export status, category, package, and then by
lexicographic order.
4.1 Exported definitions
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 (file)
4.1.2 Functions
- Function: connect-db ()
-
- Package
cl-migrations
- Source
config.lisp (file)
- Function: disconnect-db ()
-
- Package
cl-migrations
- Source
config.lisp (file)
- Function: generate NAME
-
Generate an empty migration file with an assigned version number.
- Package
cl-migrations
- Source
migrate.lisp (file)
- Function: migrate &key VERSION
-
Initiate migration procedure.
- Package
cl-migrations
- Source
migrate.lisp (file)
4.2 Internal definitions
4.2.1 Special variables
- Special Variable: *migration-dir*
-
- Package
cl-migrations
- Source
config.lisp (file)
- Special Variable: *schema-table-name*
-
- Package
cl-migrations
- Source
config.lisp (file)
- Special Variable: +all-db-types+
-
- Package
cl-migrations
- Source
config.lisp (file)
4.2.2 Functions
- Function: compare-files FILE1 FILE2
-
- Package
cl-migrations
- Source
migrate.lisp (file)
- Function: create-schema-table ()
-
Check for schema table and create if it does not exist.
- Package
cl-migrations
- Source
config.lisp (file)
- Function: db-type-spec DB-TYPE SPEC
-
- Package
cl-migrations
- Source
config.lisp (file)
- Function: decf-db-version ()
-
- Package
cl-migrations
- Source
migrate.lisp (file)
- Function: exec-migrations DB-VERSION MIG-VERSION
-
Excute all the migrations within the given range in a transaction.
- Package
cl-migrations
- Source
migrate.lisp (file)
- Function: get-db-version ()
-
- Package
cl-migrations
- Source
migrate.lisp (file)
- Function: get-file-range FROM TO
-
Get the migration files within the given range, in ascending order.
- Package
cl-migrations
- Source
migrate.lisp (file)
- Function: get-latest-migration ()
-
Get the version of latest migration available.
- Package
cl-migrations
- Source
migrate.lisp (file)
- Function: get-migration-files ()
-
Get all files from the migrations directory, and sort them numerically.
- Package
cl-migrations
- Source
migrate.lisp (file)
- Function: get-migration-number FILE
-
- Package
cl-migrations
- Source
migrate.lisp (file)
- Function: incf-db-version ()
-
- Package
cl-migrations
- Source
migrate.lisp (file)
- Function: init-config &optional CLEAN
-
Load database configuration and create a connection if none exists.
- Package
cl-migrations
- Source
config.lisp (file)
- 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 (file)
- Function: load-necessary-systems SPEC &optional CLEAN
-
Load the matching database type
- Package
cl-migrations
- Source
config.lisp (file)
- Function: read-specs &optional PATH
-
Read database and migrations directory specs and set respective variables.
- Package
cl-migrations
- Source
config.lisp (file)
- 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 (file)
- Function: spec-fn DB-TYPE
-
- Package
cl-migrations
- Source
config.lisp (file)
4.2.3 Generic functions
- Generic Function: aodbc-spec OBJECT
-
- Generic Function: (setf aodbc-spec) NEW-VALUE OBJECT
-
- Package
cl-migrations
- Methods
- Method: aodbc-spec (CONN-SPECS conn-specs)
-
automatically generated reader method
- Source
config.lisp (file)
- Method: (setf aodbc-spec) NEW-VALUE (CONN-SPECS conn-specs)
-
automatically generated writer method
- Source
config.lisp (file)
- Generic Function: mysql-spec OBJECT
-
- Generic Function: (setf mysql-spec) NEW-VALUE OBJECT
-
- Package
cl-migrations
- Methods
- Method: mysql-spec (CONN-SPECS conn-specs)
-
automatically generated reader method
- Source
config.lisp (file)
- Method: (setf mysql-spec) NEW-VALUE (CONN-SPECS conn-specs)
-
automatically generated writer method
- Source
config.lisp (file)
- Generic Function: odbc-spec OBJECT
-
- Generic Function: (setf odbc-spec) NEW-VALUE OBJECT
-
- Package
cl-migrations
- Methods
- Method: odbc-spec (CONN-SPECS conn-specs)
-
automatically generated reader method
- Source
config.lisp (file)
- Method: (setf odbc-spec) NEW-VALUE (CONN-SPECS conn-specs)
-
automatically generated writer method
- Source
config.lisp (file)
- Generic Function: oracle-spec OBJECT
-
- Generic Function: (setf oracle-spec) NEW-VALUE OBJECT
-
- Package
cl-migrations
- Methods
- Method: oracle-spec (CONN-SPECS conn-specs)
-
automatically generated reader method
- Source
config.lisp (file)
- Method: (setf oracle-spec) NEW-VALUE (CONN-SPECS conn-specs)
-
automatically generated writer method
- Source
config.lisp (file)
- Generic Function: postgresql-socket-spec OBJECT
-
- Generic Function: (setf postgresql-socket-spec) NEW-VALUE OBJECT
-
- Package
cl-migrations
- Methods
- Method: postgresql-socket-spec (CONN-SPECS conn-specs)
-
automatically generated reader method
- Source
config.lisp (file)
- Method: (setf postgresql-socket-spec) NEW-VALUE (CONN-SPECS conn-specs)
-
automatically generated writer method
- Source
config.lisp (file)
- Generic Function: postgresql-spec OBJECT
-
- Generic Function: (setf postgresql-spec) NEW-VALUE OBJECT
-
- Package
cl-migrations
- Methods
- Method: postgresql-spec (CONN-SPECS conn-specs)
-
automatically generated reader method
- Source
config.lisp (file)
- Method: (setf postgresql-spec) NEW-VALUE (CONN-SPECS conn-specs)
-
automatically generated writer method
- Source
config.lisp (file)
- Generic Function: sqlite-spec OBJECT
-
- Generic Function: (setf sqlite-spec) NEW-VALUE OBJECT
-
- Package
cl-migrations
- Methods
- Method: sqlite-spec (CONN-SPECS conn-specs)
-
automatically generated reader method
- Source
config.lisp (file)
- Method: (setf sqlite-spec) NEW-VALUE (CONN-SPECS conn-specs)
-
automatically generated writer method
- Source
config.lisp (file)
- Generic Function: sqlite3-spec OBJECT
-
- Generic Function: (setf sqlite3-spec) NEW-VALUE OBJECT
-
- Package
cl-migrations
- Methods
- Method: sqlite3-spec (CONN-SPECS conn-specs)
-
automatically generated reader method
- Source
config.lisp (file)
- Method: (setf sqlite3-spec) NEW-VALUE (CONN-SPECS conn-specs)
-
automatically generated writer method
- Source
config.lisp (file)
4.2.4 Classes
- Class: conn-specs ()
-
Connection specs for CLSQL for different databases
- Package
cl-migrations
- Source
config.lisp (file)
- Direct superclasses
standard-object (class)
- Direct methods
-
- Direct slots
- Slot: aodbc
-
- Readers
aodbc-spec (generic function)
- Writers
(setf aodbc-spec) (generic function)
- Slot: mysql
-
- Readers
mysql-spec (generic function)
- Writers
(setf mysql-spec) (generic function)
- Slot: postgresql
-
- Readers
postgresql-spec (generic function)
- Writers
(setf postgresql-spec) (generic function)
- Slot: postgresql-socket
-
- Readers
postgresql-socket-spec (generic function)
- Writers
(setf postgresql-socket-spec) (generic function)
- Slot: sqlite
-
- Readers
sqlite-spec (generic function)
- Writers
(setf sqlite-spec) (generic function)
- Slot: sqlite3
-
- Readers
sqlite3-spec (generic function)
- Writers
(setf sqlite3-spec) (generic function)
- Slot: odbc
-
- Readers
odbc-spec (generic function)
- Writers
(setf odbc-spec) (generic function)
- Slot: oracle
-
- Readers
oracle-spec (generic function)
- Writers
(setf oracle-spec) (generic function)
Appendix A Indexes
A.1 Concepts
| Index Entry | | Section |
|
C | | |
| cl-migrations.asd: | | The cl-migrations․asd file |
| cl-migrations/config.lisp: | | The cl-migrations/config․lisp file |
| cl-migrations/migrate.lisp: | | The cl-migrations/migrate․lisp file |
| cl-migrations/packages.lisp: | | The cl-migrations/packages․lisp file |
|
F | | |
| File, Lisp, cl-migrations.asd: | | The cl-migrations․asd file |
| File, Lisp, cl-migrations/config.lisp: | | The cl-migrations/config․lisp file |
| File, Lisp, cl-migrations/migrate.lisp: | | The cl-migrations/migrate․lisp file |
| File, Lisp, cl-migrations/packages.lisp: | | The cl-migrations/packages․lisp file |
|
L | | |
| Lisp File, cl-migrations.asd: | | The cl-migrations․asd file |
| Lisp File, cl-migrations/config.lisp: | | The cl-migrations/config․lisp file |
| Lisp File, cl-migrations/migrate.lisp: | | The cl-migrations/migrate․lisp file |
| Lisp File, cl-migrations/packages.lisp: | | The cl-migrations/packages․lisp file |
|
A.2 Functions
| Index Entry | | Section |
|
( | | |
| (setf aodbc-spec) : | | Internal generic functions |
| (setf aodbc-spec) : | | Internal generic functions |
| (setf mysql-spec) : | | Internal generic functions |
| (setf mysql-spec) : | | Internal generic functions |
| (setf odbc-spec) : | | Internal generic functions |
| (setf odbc-spec) : | | Internal generic functions |
| (setf oracle-spec) : | | Internal generic functions |
| (setf oracle-spec) : | | Internal generic functions |
| (setf postgresql-socket-spec) : | | Internal generic functions |
| (setf postgresql-socket-spec) : | | Internal generic functions |
| (setf postgresql-spec) : | | Internal generic functions |
| (setf postgresql-spec) : | | Internal generic functions |
| (setf sqlite-spec) : | | Internal generic functions |
| (setf sqlite-spec) : | | Internal generic functions |
| (setf sqlite3-spec) : | | Internal generic functions |
| (setf sqlite3-spec) : | | Internal generic functions |
|
A | | |
| aodbc-spec : | | Internal generic functions |
| aodbc-spec : | | Internal generic functions |
|
C | | |
| compare-files : | | Internal functions |
| connect-db : | | Exported functions |
| create-schema-table : | | Internal functions |
|
D | | |
| db-type-spec : | | Internal functions |
| decf-db-version : | | Internal functions |
| disconnect-db : | | Exported functions |
|
E | | |
| exec-migrations : | | Internal functions |
|
F | | |
| Function, compare-files : | | Internal functions |
| Function, connect-db : | | Exported functions |
| Function, create-schema-table : | | Internal functions |
| Function, db-type-spec : | | Internal functions |
| Function, decf-db-version : | | Internal functions |
| Function, disconnect-db : | | Exported functions |
| Function, exec-migrations : | | Internal functions |
| Function, generate : | | Exported functions |
| Function, get-db-version : | | Internal functions |
| Function, get-file-range : | | Internal functions |
| Function, get-latest-migration : | | Internal functions |
| Function, get-migration-files : | | Internal functions |
| Function, get-migration-number : | | Internal functions |
| Function, incf-db-version : | | Internal functions |
| Function, init-config : | | Internal functions |
| Function, init-connection : | | Internal functions |
| Function, load-necessary-systems : | | Internal functions |
| Function, migrate : | | Exported functions |
| Function, read-specs : | | Internal functions |
| Function, select-migration-files : | | Internal functions |
| Function, spec-fn : | | Internal functions |
|
G | | |
| generate : | | Exported functions |
| Generic Function, (setf aodbc-spec) : | | Internal generic functions |
| Generic Function, (setf mysql-spec) : | | Internal generic functions |
| Generic Function, (setf odbc-spec) : | | Internal generic functions |
| Generic Function, (setf oracle-spec) : | | Internal generic functions |
| Generic Function, (setf postgresql-socket-spec) : | | Internal generic functions |
| Generic Function, (setf postgresql-spec) : | | Internal generic functions |
| Generic Function, (setf sqlite-spec) : | | Internal generic functions |
| Generic Function, (setf sqlite3-spec) : | | Internal generic functions |
| Generic Function, aodbc-spec : | | Internal generic functions |
| Generic Function, mysql-spec : | | Internal generic functions |
| Generic Function, odbc-spec : | | Internal generic functions |
| Generic Function, oracle-spec : | | Internal generic functions |
| Generic Function, postgresql-socket-spec : | | Internal generic functions |
| Generic Function, postgresql-spec : | | Internal generic functions |
| Generic Function, sqlite-spec : | | Internal generic functions |
| Generic Function, sqlite3-spec : | | Internal generic functions |
| get-db-version : | | Internal functions |
| get-file-range : | | Internal functions |
| get-latest-migration : | | Internal functions |
| get-migration-files : | | Internal functions |
| get-migration-number : | | Internal functions |
|
I | | |
| incf-db-version : | | Internal functions |
| init-config : | | Internal functions |
| init-connection : | | Internal functions |
|
L | | |
| load-necessary-systems : | | Internal functions |
|
M | | |
| Method, (setf aodbc-spec) : | | Internal generic functions |
| Method, (setf mysql-spec) : | | Internal generic functions |
| Method, (setf odbc-spec) : | | Internal generic functions |
| Method, (setf oracle-spec) : | | Internal generic functions |
| Method, (setf postgresql-socket-spec) : | | Internal generic functions |
| Method, (setf postgresql-spec) : | | Internal generic functions |
| Method, (setf sqlite-spec) : | | Internal generic functions |
| Method, (setf sqlite3-spec) : | | Internal generic functions |
| Method, aodbc-spec : | | Internal generic functions |
| Method, mysql-spec : | | Internal generic functions |
| Method, odbc-spec : | | Internal generic functions |
| Method, oracle-spec : | | Internal generic functions |
| Method, postgresql-socket-spec : | | Internal generic functions |
| Method, postgresql-spec : | | Internal generic functions |
| Method, sqlite-spec : | | Internal generic functions |
| Method, sqlite3-spec : | | Internal generic functions |
| migrate : | | Exported functions |
| mysql-spec : | | Internal generic functions |
| mysql-spec : | | Internal generic functions |
|
O | | |
| odbc-spec : | | Internal generic functions |
| odbc-spec : | | Internal generic functions |
| oracle-spec : | | Internal generic functions |
| oracle-spec : | | Internal generic functions |
|
P | | |
| postgresql-socket-spec : | | Internal generic functions |
| postgresql-socket-spec : | | Internal generic functions |
| postgresql-spec : | | Internal generic functions |
| postgresql-spec : | | Internal generic functions |
|
R | | |
| read-specs : | | Internal functions |
|
S | | |
| select-migration-files : | | Internal functions |
| spec-fn : | | Internal functions |
| sqlite-spec : | | Internal generic functions |
| sqlite-spec : | | Internal generic functions |
| sqlite3-spec : | | Internal generic functions |
| sqlite3-spec : | | Internal generic functions |
|
A.3 Variables
| Index Entry | | Section |
|
* | | |
| *cl-migrations-version* : | | Exported special variables |
| *config-pathname* : | | Exported special variables |
| *migration-dir* : | | Internal special variables |
| *schema-table-name* : | | Internal special variables |
|
+ | | |
| +all-db-types+ : | | Internal special variables |
|
A | | |
| aodbc : | | Internal classes |
|
M | | |
| mysql : | | Internal classes |
|
O | | |
| odbc : | | Internal classes |
| oracle : | | Internal classes |
|
P | | |
| postgresql : | | Internal classes |
| postgresql-socket : | | Internal classes |
|
S | | |
| Slot, aodbc : | | Internal classes |
| Slot, mysql : | | Internal classes |
| Slot, odbc : | | Internal classes |
| Slot, oracle : | | Internal classes |
| Slot, postgresql : | | Internal classes |
| Slot, postgresql-socket : | | Internal classes |
| Slot, sqlite : | | Internal classes |
| Slot, sqlite3 : | | Internal classes |
| Special Variable, *cl-migrations-version* : | | Exported special variables |
| Special Variable, *config-pathname* : | | Exported special variables |
| Special Variable, *migration-dir* : | | Internal special variables |
| Special Variable, *schema-table-name* : | | Internal special variables |
| Special Variable, +all-db-types+ : | | Internal special variables |
| sqlite : | | Internal classes |
| sqlite3 : | | Internal classes |
|
A.4 Data types