We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database class has the methods createTable and dropTable. But it does not have the same behavior that a Migration has with up and down method.
Usage example (this is just an example and could change when developing Schema):
import { Migration } from '@secjs/database' export class UsersMigration extends Migration { protected tableName = 'users' public async up() { this.createTable(this.tableName, (table) => { table.increments('id').primary() table.string('name').nullable() table.timestamp('created_at', { useTz: true }) table.timestamp('updated_at', { useTz: true }) }) } public async down() { this.dropTable(this.tableName) } }
1.0.1
The text was updated successfully, but these errors were encountered:
jlenon7
No branches or pull requests
Description
Database class has the methods createTable and dropTable. But it does not have the same behavior that a Migration has with up and down method.
Usage example (this is just an example and could change when developing Schema):
Package version
1.0.1
The text was updated successfully, but these errors were encountered: