Skip to content

Commit

Permalink
Updated project, readme, history and roadmap files for 0.8 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
budu committed Aug 29, 2011
1 parent 5a8e1e9 commit fbe08be
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 19 deletions.
4 changes: 4 additions & 0 deletions history.md
@@ -1,5 +1,9 @@
# Lobos History

## 0.8

* Support for migration

## 0.7

* Add support for creating indexes
Expand Down
4 changes: 2 additions & 2 deletions project.clj
@@ -1,4 +1,4 @@
(defproject lobos "0.8.0-SNAPSHOT"
(defproject lobos "0.8.0"
:description
"A library to create and manipulate SQL database schemas."
:dependencies [[org.clojure/clojure "1.2.1"]
Expand All @@ -9,4 +9,4 @@
[cljss "0.1.1"]
[hiccup "0.3.1"]
[com.h2database/h2 "1.3.158"]]
:jar-exclusions [#"www.clj" #"config.clj" #"migrations.clj"])
:jar-exclusions [#"www.clj" #"config.clj" #"migrations.clj"])
42 changes: 33 additions & 9 deletions readme.md
Expand Up @@ -148,8 +148,18 @@ You can always set the debug level to see the compiled statement:
As you can see **Lobos** use delimited identifiers by default and schema
qualified identifiers when an action use a schema.

### Configuration

The preferred location to keep your database specs and connection for
**Lobos** is in the `src/lobos/config.clj` file. The namespace contained
in it will be used by default when generating the migrations file. This
is just a convention, you can use any other means you wish using normal
Clojure code.

### Migrations

#### Generating migrations

**Lobos** records each actions and include a set of commands to create
migrations, run and rollbacks them. When you execute an action, the
call used will be recorded inside a stash file found in
Expand All @@ -162,25 +172,39 @@ call used will be recorded inside a stash file found in
(create (table :users (integer :id)))

Recorded actions can be dumped into one or more migrations using the
`dump` command:
`generate-migration` command:

user> (dump 'create-users)
user> (generate-migration 'create-users)
nil

This command will create a migration definition into the migration file
(located in `src/lobos/migrations.clj` by default) for all action found
in the stash file.
in the stash file.

You can always use `generate-migration` to create a new (empty)
migration if there's no recorded actions and edit them directly from the
migrations file.

Then you can use the `run` and `rollback` commands:
The `generate-migration` command will automatically generate the undo
method for some actions.

#### Migrate & Rollback

Then you can use the `migrate` and `rollback` commands:

user> (rollback)
create-users
user> (run)
user> (migrate)
create-users

The `dump` command will automatically generate the undo method for some
actions.
These commands will run the `up` or `down` part of migrations in the
correct order. Both can take any number of migration names and will only
run these. By default the `migrate` command run all pending migrations
while the `rollback` command only affect the last one.

The `rollback` command can also take a number or `:all` as argument, in
which case it will rollback only the number of migrations that you want.

There's also three print commands to look where you are into the
migration process: `print-stash`, `print-pending` and `print-done`.

Expand Down Expand Up @@ -211,14 +235,14 @@ Lobos is available through Clojars.

For the latest release, in Cake/Leiningen:

[lobos "0.8.0-SNAPSHOT"]
[lobos "0.8.0"]

in Maven:

<dependency>
<groupId>lobos</groupId>
<artifactId>lobos</artifactId>
<version>0.8.0-SNAPSHOT</version>
<version>0.8.0</version>
</dependency>

## License
Expand Down
19 changes: 11 additions & 8 deletions roadmap.md
Expand Up @@ -2,20 +2,23 @@

You can have a look at the [wiki] for more details.

## 0.11
## 1.0

* Emulate transaction support
* Clean up and some small improvements
* Make sure the API doesn't contains serious flaws

## 0.10
## 1.1

* Support for declarative schema definition
* Support for parsing SQL expressions
* Make the analyzer be feature complete in comparison to the compiler

## 0.9
## 1.2

* Support for parsing SQL expressions
* Support for declarative schema definition

## 1.3

## 0.8
* Emulate transaction support

* Support for migration

[wiki]: https://github.com/budu/lobos/wiki

0 comments on commit fbe08be

Please sign in to comment.