parse-community / parse-dashboard

A dashboard for managing Parse Server
https://parseplatform.org
Other
3.73k stars 1.38k forks source link

can not create index #2518

Closed badboy-tian closed 6 months ago

badboy-tian commented 7 months ago

New Issue Checklist

Issue Description

can create _created_at index

Steps to reproduce

export const AVFile = {
    className: "AVFile",
    fields: {
        mime_type: {type: "String"},
        key: {type: "String"},
        name: {type: "String"},
        provider: {type: "String"},
        owner: {type: "String"},
        size: {type: "Number"},
        url: {type: "String"},
        objectId: {type: "String"},
    },
    indexes: {
        _AVFile_ownerIndex: {owner: 1},
        _AVFile_createdAtIndex: {_created_at: 1},
        _AVFile_updatedAtIndex: {_updated_at: 1},
        _AVFile_objectId: {objectId: 1},
    },
    classLevelPermissions: {
        find: {},
        count: {},
        get: {},
        update: {},
        create: {},
        delete: {},
        protectedFields: {},
    },
}

Actual Outcome

error: Failed to run migrations: Error during update of schema for type AVFile: ParseError: 102 Field _created_at does not exist, cannot add index

Expected Outcome

success

Environment

Dashboard

Server

Database

Logs

 10:12:07 AM - Found 0 errors. Watching for file changes.
[TS] DATABASE_URI not specified, falling back to localhost.
[TS] databaseUri: mongodb://localhost:27017/dev
[TS] redisUri not specified, falling back to localhost.
[TS] redisUri: redis://localhost:6379
[TS] warn: DeprecationWarning: The Parse Server option 'allowExpiredAuthDataToken' default will change to 'false' in a future version.
[TS] warn: DeprecationWarning: The Parse Server option 'encodeParseObjectInCloudFunction' default will change to 'true' in a future version.
[TS] app: 3.186s
[TS] Node app is running on port: 1337
[TS] info: Running Migrations
[TS] error: Failed to run migrations: Error during update of schema for type AVFile: ParseError: 102 Field _created_at does not exist, cannot add index.
[TS] info: Running Migrations Completed
parse-github-assistant[bot] commented 7 months ago

Thanks for opening this issue!

badboy-tian commented 7 months ago
  _User_objectId: {_id: 1},
        _User_createdAt: {_created_at: 1},
        _User_updatedAt: {_updated_at: 1},
 Failed to run migrations: Error during update of schema for type _User: ParseError: 102 Field _id does not exist, cannot add index.
badboy-tian commented 7 months ago
_User_objectId: {objectId: 1},
        _User_createdAt: {createdAt: 1},
        _User_updatedAt: {updatedAt: 1},
error: Failed to run migrations: Error during update of schema for type _User: ParseError: 102 Field objectId does not exist, cannot add index
mtrezza commented 7 months ago

Please add more details to the issue description. How is this a Parse Dashboard issue?

mtrezza commented 6 months ago

I'm closing this as it does not seem to be a Parse Dashboard issue and no further information has been provided.