Code Monkey home page Code Monkey logo

laravel-dm8's Introduction

简介

DM8 database driver implementation for Laravel

达梦数据库DM8的 Laravel 驱动,已在 Laravel 5.2|5.8|7|8 中测试

安装

composer require lmo/laravel-dm8

配置

  1. config/app.php 中添加:
'providers' => [
    ...
    \Lmo\LaravelDm8\Dm8ServiceProvider::class,
    ...
],
  1. env 中的 DB_CONNECTION 修改为 dm:
DB_CONNECTION=dm
DB_HOST=127.0.0.1
DB_PORT=5236
DB_DATABASE=USER   # 模式
DB_USERNAME=USER   # 用户
DB_PASSWORD=PASS

迁移需知:

  1. 所有数据表需包含唯一ID
  2. 因数据库限制,不能在migration中将VARCHAR类型字段转换为TEXT
  3. migration中创建的索引,命名规则为:{table_name}_{row_name}_index,复合索引则为{table_name}_{row_name_1}_{row_name_2}_index
  4. migration中以increments创建的自增主键,实际上会被创建为以{table_name}_{row_name}_pk命名的序列及INT类型的唯一键
  5. 达梦中对象名称长度限制为128字符,创建时请注意

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.