Rename, restructure, and backfill your data with no downtime and immediate rollbacks. ReshapeDB makes complex schema and data changes as simple and safe as refactoring your code.
model User {
field id: Id
primary_key id
field balance: Int {
default: 0
}
}
Define your database schema with a simple file format, right next to your code
db.transaction(async |txn| {
let user = users::getById(txn, id).await?;
let test = 0;
// Decrement user balance
user.balance -= amount;
user.save(txn).await?;
});
ReshapeDB generates a type-safe client from your schema, in whatever programming language you prefer
// Create clean database for test
let db = reshape::setupTestDatabase();
users::insert(&db, testUserData());
let service = YourService::new(&db);
assert_eq!(1, service.getAllUsers());
Stop mocking your database in tests, create an isolated databases for each test with a single line of code
Use the simple DSL to define your schema changes and embed Typescript to define how to translate between your new and old schema.
ReshapeDB will automatically backfill any changes and transparently translate between your old and new schema.
model User {
// ...
field email: String {
up: {
const extractedEmail = metadata["email"];
return {
email: extractedEmail,
}
}
}
field metadata: Json {
default: {}
}
}
With distributed, strictly serializable ACID transactions, ReshapeDB is ready for your most critical workloads.
ReshapeDB scales up simply by adding more nodes. Your data is automatically sharded and balanced for optimal performance.
All your data is replicated across availability zones and ReshapeDB effortlessly handles outages without skipping a beat.
We are hard at work building out ReshapeDB. Sign up below to be the first to try it out!