| 作成者 | {{config.author}} | {% endif -%}作成日 | {{date | date(format="%x", locale=locale)}} |
|---|
| No. | モデルグループ |
|---|---|
| {{loop.index}} | {{group.group_def.title}} |
| 更新日 | 変更内容 |
|---|---|
| {{row.date | date(format="%x", locale=locale)}} |
{{description | safe}}
|
| モデルグループ | {{group.group_def.title}} | {% endif -%} {% if config.author -%}作成者 | {{config.author}} | {% endif -%}作成日 | {{date | date(format="%x", locale=locale)}} |
|---|
| No. | テーブル名 |
|---|---|
| {{loop.index}} | {{model_name}} {%- if model.title %} ({{model.title}}){% endif %} |
| No. | 列挙型名 |
|---|---|
| {{loop.index}} | {{name}} {%- if enum.title %} ({{enum.title}}){% endif %} |
実テーブル名: {{model.table_name}}
{% if model.comment -%}| No. | カラム名 | データ型 | Null | 長さ | 主 | 備考 |
|---|---|---|---|---|---|---|
| {{loop.index}} | {{column | get(key="rename", default=name)}} | {% if column.signed %}signed {% endif %}{{column.type}} | {% if not column.not_null %}Y{% endif %} | {%- if column.length %}{{column.length}}{% endif %} {%- if column.precision %}{{column.precision}}{% endif %} {%- if column.scale %},{{column.scale}}{% endif %} | {% if column.primary %}Y{% endif %} |
{%- if column.title %} {{column.title}} {% endif %} {%- if column.enum_values -%}{% for enum in column.enum_values -%}
{{enum.value}}:{{enum | get(key="title", default=enum.name) }}
{%- if enum.comment %} ({{enum.comment}}){% endif %}
{%- if not loop.last %} {% for enum in column.db_enum_values -%}{{enum.name}}
{%- if enum.title %}:{{enum.title}}{% endif %}
{%- if enum.comment %} ({{enum.comment}}){% endif %}
{%- if not loop.last %} {{column.comment}}{% endif -%}
|
データ型に signed の指定がない場合、 double, decimal 等も含めすべての数値型は unsigned。
| No. | タイプ | カラム |
|---|---|---|
| {{loop.index}} | {%- if index %}{{index | get(key="type", default="INDEX") | upper}} {%- else %}INDEX{% endif %} | {%- if index and index.fields %}{% for name, field in index.fields -%}{{name}} {%- if field and field.length %}({{field.length}}){% endif %} {%- if not loop.last %}, {% endif %} {%- endfor %}{% else %}{{name}}{% endif %} |
| No. | 名前 | タイプ | カラム | 結合先 | 結合カラム | 削除時 |
|---|---|---|---|---|---|---|
| {{loop.index}} | {{relation | get(key="title", default=name)}} | {% if type == "one_to_one" %}ONE{% else %}{{type | upper}}{% endif %} | {%- if relation.local %}{{relation.local}}{% else %} {%- if type == "many" or type == "one_to_one" %}-{% else %}{{name}}_id{% endif %} {%- endif %} | {{relation.model | split(pat="::") | last}} | {%- if relation.foreign %}{{relation.foreign}}{% else %} {%- if type == "many" %}{{model_name}}_id{% else %}-{% endif %} {% endif %} | {{relation | get(key="on_delete", default="")}} |
カラムの - は主キー。{%- if config.ignore_foreign_key %}実際にはデータベースに外部キー制約は設定しない。{% endif -%}
{{enum.comment}}
| 値 | 名前 | 備考 |
|---|---|---|
| {{value.value}} | {{value | get(key="title", default=value.name) }} |
{%- if value.comment %}
{{value.comment}}
{% endif -%}
|
{{model.comment}}