Const
DDL and ORM extension that adds database DDL metadata, relationship definitions, and ORM conveniences to schema builders.
Column-level methods: .primaryKey(), .references(), .unique(), .index(), .defaultTo(), .columnType(), .check(), .defaultToRaw().
.primaryKey()
.references()
.unique()
.index()
.defaultTo()
.columnType()
.check()
.defaultToRaw()
Object-level methods: .hasIndex(), .hasUnique(), .hasCheck(), .hasPrimaryKey(), .hasRawColumn(), .hasRawIndex(), .hasMany(), .hasOne(), .belongsTo(), .belongsToMany(), .hasTimestamps(), .softDelete(), .scope(), .defaultScope(), .beforeInsert(), .afterInsert(), .beforeUpdate(), .beforeDelete().
.hasIndex()
.hasUnique()
.hasCheck()
.hasPrimaryKey()
.hasRawColumn()
.hasRawIndex()
.hasMany()
.hasOne()
.belongsTo()
.belongsToMany()
.hasTimestamps()
.softDelete()
.scope()
.defaultScope()
.beforeInsert()
.afterInsert()
.beforeUpdate()
.beforeDelete()
DDL and ORM extension that adds database DDL metadata, relationship definitions, and ORM conveniences to schema builders.
Column-level methods:
.primaryKey(),.references(),.unique(),.index(),.defaultTo(),.columnType(),.check(),.defaultToRaw().Object-level methods:
.hasIndex(),.hasUnique(),.hasCheck(),.hasPrimaryKey(),.hasRawColumn(),.hasRawIndex(),.hasMany(),.hasOne(),.belongsTo(),.belongsToMany(),.hasTimestamps(),.softDelete(),.scope(),.defaultScope(),.beforeInsert(),.afterInsert(),.beforeUpdate(),.beforeDelete().