public function up Schemacreateorders function Blueprint $table $table-incrementsid; $table-stringno-unique; $table-unsignedIntegeruser_id; $tab
create_table :orders do |t| t.string :no, unique: true t.integer :user_id, index: true t.text :address t.decimal :total_amount t.text :remark t.datetime :paid_at t.string :payment_method t.string :payment_no t.string :refund_status, default: 'pending' t.string :refund_no t.boolean :closed, default: false t.boolean :reviewed, default: false t.string :ship_status, default: 'pending' t.text :ship_data t.text :extra t.timestamps end
原文地址: https://www.cveoy.top/t/topic/igF9 著作权归作者所有。请勿转载和采集!