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]
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
authors = yu moqing
author_email = yumoqing@gmail.com

View File

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