asika32764 / JConsole

Some useful Cli tools for Joomla CMS
2 stars 1 forks source link

export/import table comment #26

Open LeoOnTheEarth opened 9 years ago

LeoOnTheEarth commented 9 years ago

It is good to have this feature

asika32764 commented 9 years ago

table 有 comment 喔?

那你幫我看一下現在的 yaml 格式裡面哪邊有空間可以放

LeoOnTheEarth commented 9 years ago

table 有 comment 喔?

MySQL 有 但我不確定其他的關聯資料庫有沒有

'#__table_name':
    name: '#__table_name'
    comment: 'This is table comment'
    from:
        - '#__table_name'
    columns:
        id: { Field: id, Type: int(11), 'Null': NO, Default: null, Extra: auto_increment, Comment: The id, From: [id] }
        foo: { Field: foo, Type: varchar(64), 'Null': YES, Default: null, Extra: '', Comment: 'Foo', From: [foo] }
    index:
        - { Table: '#__table_name, Non_unique: '0', Key_name: PRIMARY, Seq_in_index: '1', Column_name: id, Sub_part: null, 'Null': '', Comment: '', Index_comment: '' }
LeoOnTheEarth commented 9 years ago

https://github.com/asika32764/JConsole/blob/staging/src/Sqlsync/Query/MysqlQueryBuilder.php#L160

Table Comment 在這個方法可以取得,欄位名稱是 Comment