Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Releases: PhilWaldmann/openrecord

destroy() scope bugfix

27 Feb 13:56
Compare
Choose a tag to compare
v0.5.2

destroy() scope bugfix

add hasOne relations

27 Feb 10:09
Compare
Choose a tag to compare

It's now possible to add has one relations via this.hasOne('relation_name');

Migration support added

25 Feb 14:30
Compare
Choose a tag to compare

It's not possible to add migrations!

Define a migration similar to a model:

/migrations/20140225152117_create_users.js

module.exports = function(){
  this.createTable('users', function(){
    this.string('login', {not_null: true});
    this.string('first_name');
  });
};

The id column will be added automatically

Define your store with a migrations option

var store = new Store({
  type: 'postgres',
  models: __dirname + '/models/*',
  migrations: __dirname + '/migrations/*',
  // + connection options
});

and it will automatically run all missing migrations for you.

Select bugfixes

19 Feb 14:19
Compare
Choose a tag to compare
v0.3.6

select bugfix

Postgres automatic validation bugfix

19 Feb 10:55
Compare
Choose a tag to compare
v0.3.5

postgres length bugfix

Missing Attributes and validatesUniquenessOf() bugfixes

19 Feb 09:46
Compare
Choose a tag to compare

null or false values will be loaded now.

Relation enhancements

18 Feb 19:31
Compare
Choose a tag to compare

It's now possible to create a new record via a relation.
e.g.

//Definition
Model('User', function(){
  this.hasMany('posts');
});

//Usage
User.find(1, function(user){
  user.posts.create({message:'foo'}, function(){
    //the new post automatically get's a the user_id set
  });
});

or via user.posts.new()
or user.posts.add(new_record)
or user.posts = [new_record1, new_record2]
or user.posts = new_record

Postgres Date, Datetime und Time bugfixes

18 Feb 15:09
Compare
Choose a tag to compare
v0.3.2

postgres date, datetime und time bugfix

Bugfix on record updates

18 Feb 14:35
Compare
Choose a tag to compare
v0.3.1

update bugfix

Add full Postgres support

17 Feb 23:10
Compare
Choose a tag to compare
  1. All tests run on SQLite3 and Postgres now
  2. new Validator methods: validatesLengthOf() and validatesNumericalityOf
  3. validatesUniquenessOf() now accepts options. It's now possible to define a scope