This commit is contained in:
yumoqing 2025-12-11 15:52:19 +08:00
parent 2b89a1f515
commit f8a5b4f92c
2 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name=sqlor name=sqlor
version = 2.0.3 version = 2.1.0
description = a new version of sqlor, each db's sor need to plugin to sqlor, and dbdriver now a isolated module description = a new version of sqlor, each db's sor need to plugin to sqlor, and dbdriver now a isolated module
authors = yu moqing authors = yu moqing
author_email = yumoqing@gmail.com author_email = yumoqing@gmail.com

View File

@ -18,7 +18,7 @@ datetime
{%- elif type=='timestamp' -%} {%- elif type=='timestamp' -%}
TIMESTAMP DEFAULT CURRENT_TIMESTAMP TIMESTAMP DEFAULT CURRENT_TIMESTAMP
{%- elif type=='text' -%} {%- elif type=='text' -%}
longtext longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
{%- elif type=='bin' -%} {%- elif type=='bin' -%}
longblob longblob
{%- else -%} {%- else -%}
@ -38,6 +38,8 @@ NOT NULL
{% macro primary() %} {% macro primary() %}
,primary key({{','.join(summary[0].primary)}}) ,primary key({{','.join(summary[0].primary)}})
{% endmacro %} {% endmacro %}
-- 建库时请用以下语句支持emoji字符
-- CREATE DATABASE mydb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
drop table if exists {{summary[0].name}}; drop table if exists {{summary[0].name}};
CREATE TABLE {{summary[0].name}} CREATE TABLE {{summary[0].name}}
( (
@ -48,8 +50,9 @@ CREATE TABLE {{summary[0].name}}
{{primary()}} {{primary()}}
{% endif %} {% endif %}
) )
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci
engine=innodb engine=innodb
default charset=utf8
{% if summary[0].title %}comment '{{summary[0].title}}'{% endif %} {% if summary[0].title %}comment '{{summary[0].title}}'{% endif %}
; ;
{% for v in indexes %} {% for v in indexes %}