Veldora supports SQLite, MySQL, and PostgreSQL with a unified Schema Blueprint.
Creating a Migration
Terminal • bash
php veldora make:migration create_posts_tabledatabase/migrations/create_posts_table.php
PHP
use Veldora\Framework\Database\Schema\Blueprint;
use Veldora\Framework\Database\Schema\Migration;
use Veldora\Framework\Database\Schema\Schema;
class CreatePostsTable extends Migration
{
public function up(): void
{
Schema::create('posts', function (Blueprint $table) {
$table->id();
$table->integer('user_id');
$table->string('title');
$table->string('slug')->unique();
$table->text('body');
$table->boolean('is_published')->default(0);
$table->timestamp('published_at')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('posts');
}
}Migration Commands
Terminal • bash
# Run pending migrations
php veldora migrate
# Check migration status
php veldora migrate:status
# Rollback last migration batch
php veldora migrate:rollback
# Reset database & re-run all migrations
php veldora migrate:freshAvailable Blueprint Column Types
| Method | SQL Type | Description |
|---|---|---|
$table->id() | AUTO_INCREMENT PK | Primary key ID |
$table->string('name', 255) | VARCHAR(255) | String column |
$table->text('content') | TEXT | Large text block |
$table->integer('count') | INT | Integer |
$table->boolean('active') | TINYINT(1) / INTEGER | Boolean true/false |
$table->timestamp('created_at') | TIMESTAMP | Date & time |
$table->timestamps() | created_at + updated_at | Auto timestamp pair |
$table->softDeletes() | deleted_at | Soft deletion column |
$table->rememberToken() | remember_token | Auth remember token |