PHP Laravel 是否有像 Rails 一样的数据库模式文件

Jam*_*ond 5 php laravel

我是一名 Rails 开发人员,现在主要从事 PHP Laravel 工作。在Rails中,schema.rb是一个总结数据库的文件,非常方便开发人员了解数据库模式,例如列的数据类型是什么。

我想知道 Lavaral 是否有与 Ruby on Rails 类似的文件或 Lavaral 开发人员的任何解决方法?目前只能找到迁移文件看数据类型,非常不方便。

这是 Rails 架构文件的示例,Php Laravel 是否有类似的文件:

    ActiveRecord::Schema.define(version: 20130315230445) do

    create_table "microposts", force: true do |t|
        t.string   "content"
        t.integer  "user_id"
        t.datetime "created_at"
        t.datetime "updated_at"
    end

    add_index "microposts", ["user_id", "created_at"], name: "index_microposts_on_user_id_and_created_at"

    create_table "relationships", force: true do |t|
        t.integer  "follower_id"
        t.integer  "followed_id"
        t.datetime "created_at"
        t.datetime "updated_at"
    end

    add_index "relationships", ["followed_id"], name: "index_relationships_on_followed_id"
    add_index "relationships", ["follower_id", "followed_id"], name: "index_relationships_on_follower_id_and_followed_id", unique: true
    add_index "relationships", ["follower_id"], name: "index_relationships_on_follower_id"

    create_table "users", force: true do |t|
        t.string   "name"
        t.string   "email"
        t.datetime "created_at"
        t.datetime "updated_at"
        t.string   "password_digest"
        t.string   "remember_token"
        t.boolean  "admin"
    end

    add_index "users", ["email"], name: "index_users_on_email", unique: true
    add_index "users", ["remember_token"], name: "index_users_on_remember_token"

    end
Run Code Online (Sandbox Code Playgroud)

Dwi*_*ght 4

很简单,不 - 它没有schema.rb像 Rails 这样的文件。