dpodium / yii2-filemanager

14 stars 15 forks source link

Support MSSQL #19

Open micronull opened 6 years ago

micronull commented 6 years ago

When I try to apply a migration, I get an error

*** applying m150721_075656_filemanager_init
    > create table {{%folders}} ... done (time: 0.055s)
    > create table {{%files}} ...Exception 'yii\db\Exception' with message 'SQLSTATE[HY000]: General error: 102 Incorrect syntax near 'COMMENT'. [102] (severity 15) [(null)]
The SQL being executed was: CREATE TABLE [panel_files] (
    [file_id] bigint IDENTITY PRIMARY KEY,
    [file_identifier] nvarchar(32) NOT NULL,
    [host] nvarchar(64) NULL,
    [url] nvarchar(255) NOT NULL,
    [storage_id] nvarchar(64) NOT NULL,
    [object_url] nvarchar(255) NOT NULL,
    [thumbnail_name] nvarchar(100) NULL,
    [src_file_name] nvarchar(64) NOT NULL,
    [mime_type] nvarchar(100) NOT NULL,
    [caption] nvarchar(64) NULL,
    [alt_text] nvarchar(64) NULL,
    [description] nvarchar(255) NULL,
    [dimension] nvarchar(12) NULL COMMENT "w X h",
    [folder_id] bigint NOT NULL,
    [created_at] int NOT NULL,
    [updated_at] int NOT NULL
)'
priyankadpodium commented 6 years ago

Hi, we have only verified the script in MySQL. If you using MSSQL, you can try without " COMMENT "w X h"" and update at your end using MSSQL. Thank you.