Skip to content
Browse files

Updated project, readme, history and roadmap files for 0.8 release.

  • Loading branch information...
1 parent 5a8e1e9 commit fbe08be012e965ac9c62ef88b7150885b778811e @budu budu committed
Showing with 50 additions and 19 deletions.
  1. +4 −0 history.md
  2. +2 −2 project.clj
  3. +33 −9 readme.md
  4. +11 −8 roadmap.md
View
4 history.md
@@ -1,5 +1,9 @@
# Lobos History
+## 0.8
+
+ * Support for migration
+
## 0.7
* Add support for creating indexes
View
4 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"]
@@ -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"])
View
42 readme.md
@@ -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
@@ -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`.
@@ -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
View
19 roadmap.md
@@ -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.
Something went wrong with that request. Please try again.