bosnadev / database

An extended PostgreSQL driver for Laravel 5 with support for some aditional PostgreSQL data types: hstore, uuid, jsonb.
https://bosnadev.com
MIT License
78 stars 68 forks source link

Added table inheritance - $table->inherits('name') #22

Closed deadem closed 8 years ago

deadem commented 8 years ago

Added postgresql table inheritance feature.

Using:

Schema::create('test', function ($table) {
    $table->string('name');
});

Schema::create('subtest', function ($table) {
    $table->string('text');
    $table->inherits('test');
});

Now table subtest inherited from test table and have both name and text fields.