Unverified Commit ff745fcf authored by Claudio Costa's avatar Claudio Costa Committed by GitHub
Browse files

Remove redundant indexes (#17710)

parent fb452d85
......@@ -104,7 +104,7 @@ func mysql000001_create_teamsDownSql() (*asset, error) {
return a, nil
}
var _mysql000001_create_teamsUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x96\x51\x6f\x9b\x30\x14\x85\xdf\xf9\x15\xf7\x2d\x30\x4d\x53\x9b\xb5\x55\xa5\x28\xd3\x5c\xb8\x69\xad\x11\xe8\xc0\x68\xed\x53\xe4\x04\x77\xb5\x04\x36\x02\xa7\x6b\xff\xfd\x14\x43\x58\xd7\xd0\x2d\x6a\x1f\x26\x4d\x7d\x41\x0a\xf7\xf3\xd1\xf5\x3d\xc7\x26\x7e\x82\x84\x21\x30\x72\x16\x22\xd0\x19\x44\x31\x03\xbc\xa2\x29\x4b\x81\x09\x5e\x36\xe0\x3a\x00\x00\x34\x87\x3b\x5e\xaf\x6e\x79\xed\x8e\x4f\x3c\x4b\x45\x59\x18\xbe\xb7\x45\xbf\x16\xdc\x08\x62\x60\x29\xbf\x4b\x65\xdc\xf1\x81\x07\x01\xce\x48\x16\x3e\xa6\xb2\x2a\xdf\x83\x0a\x44\x21\xf6\xa0\x64\x53\x15\xfc\x21\xe2\xa5\xe8\xfb\x3a\x39\x1a\x22\xf7\x40\x02\xd1\xac\x6a\x59\x19\xa9\xd5\xaf\x4d\x1e\x1f\x0f\xa1\x58\x72\x59\xf4\xd0\xe1\xf8\x74\x08\x62\x0f\x95\xf8\x9b\x90\xaf\xcb\x8a\xab\x7d\x36\x40\x8a\x42\xff\x10\x79\xa0\x4b\x2e\x55\x03\x46\xdc\x9b\xb6\x40\xd5\x9d\x34\xe2\x91\x31\x1f\xc7\x43\xeb\xd3\xd5\xad\x28\xc5\x13\xff\x76\xb1\xcb\x84\xce\x49\x72\x0d\x5f\xf0\x1a\x5c\x9a\x7b\x9d\x67\x11\xfd\x9a\xa1\x7d\x69\x5b\x75\x37\xcf\xae\xb6\x79\x29\xf3\xfb\x85\xd9\xc4\x64\xa1\xfe\x5c\x96\xb6\xd9\x85\xcc\xc1\xdd\xf6\x3d\xc8\xad\x6d\x48\x16\xdc\x80\xbb\xcd\xcb\x20\xb7\xb2\x91\xb3\xdc\x36\x7d\x83\x5c\x6e\xe3\x64\xb9\x6d\xb2\x06\xb9\xc6\x4e\xc9\xf6\xb7\x1d\x98\xe7\x78\x80\xd1\x39\x8d\x70\x4a\x95\xd2\xc1\x59\x3f\x35\xff\x82\x24\x29\xb2\xe9\xda\xdc\x9c\x96\xcb\xa3\x89\xe3\xa4\xc8\xe0\x73\x55\x8b\x8a\xd7\x22\x4f\x0d\x37\xa2\x14\xca\xc0\x14\xdc\x14\x43\xf4\x19\xd0\x59\x7b\x8e\xda\xa7\xf5\xa5\x2d\xf8\x71\x16\x31\xf7\x9d\x07\xb3\x24\x9e\x03\x8d\x66\x71\x32\x27\x8c\xc6\xd1\x22\xf5\x2f\x70\x4e\x3e\xf8\x71\x98\xcd\xa3\xb4\x5f\xf7\xed\x02\x13\x04\xc3\x97\x85\x68\x87\x3e\x85\x91\x3d\xa9\xa3\x1e\x21\x51\xd0\x01\x76\x5b\x1c\xa6\x10\x10\x46\xce\x48\x8a\xae\xf7\x1b\xb5\xd2\xc5\xba\x54\xbd\x8e\xcd\x5a\x5c\x09\xd5\x7a\xd4\x2a\x7a\xf0\x09\x0e\xda\x99\x8d\xba\xa6\x0f\x47\xdd\x6f\x12\x32\x4c\xba\xcb\xa3\xbd\x2e\x48\x10\xc0\x13\x19\x58\x6a\x5d\x4c\x46\x8e\xe7\x4d\x1c\xe7\x32\xc1\x4b\x92\x20\xf0\xc2\x88\x9a\xde\x44\xda\xe0\xbd\x6c\x4c\xd3\xee\x7f\x77\x86\x13\x07\xaf\xd0\xcf\xd8\xee\x8a\x89\x13\x20\x09\xc3\xd8\xdf\xdc\x5f\xcf\xc9\xfe\x3f\xde\x84\xbc\x31\x1b\x2d\xba\xd2\xaa\x3d\x1a\x2f\xb5\x67\x57\xa9\xbb\x6c\xdf\x3c\x7a\xa5\x47\x8f\xbe\x24\x2f\x35\xe7\xb9\x8f\xd1\x9b\x37\xaf\xf4\xe6\xbc\xd6\xeb\xca\xd7\xaa\x31\x35\x97\x4a\xe4\x2f\x35\xe8\xa9\x0e\x18\xa9\x1e\x36\xff\x54\x0e\xff\x9d\x47\x3f\x03\x00\x00\xff\xff\x63\x30\x29\x71\xc5\x09\x00\x00")
var _mysql000001_create_teamsUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x96\x51\x6f\x9b\x3e\x14\xc5\xdf\xf9\x14\xf7\x2d\xf0\xd7\x5f\x53\x9b\xb5\x55\xa5\x28\xd3\x5c\xb8\x69\xad\x11\xe8\xc0\x68\xed\x53\xe4\x04\x77\xb5\x04\x36\x02\xa7\x6b\xbf\xfd\x84\x21\x59\xd7\x50\x2d\x4a\x1f\x26\x4d\x7d\x41\x0a\xfe\xf9\xe8\xfa\x9e\xe3\x4b\xfc\x04\x09\x43\x60\xe4\x22\x44\xa0\x33\x88\x62\x06\x78\x43\x53\x96\x02\x13\xbc\x6c\xc0\x75\x00\x00\x68\x0e\x0f\xbc\x5e\xdd\xf3\xda\x1d\x9f\x79\x96\x8a\xb2\x30\xfc\xdf\x2e\xfa\xb5\xe0\x46\x10\x03\x4b\xf9\x5d\x2a\xe3\x8e\x8f\x3c\x08\x70\x46\xb2\xf0\x39\x95\x55\xf9\x1e\x54\x20\x0a\xb1\x07\x25\x9b\xaa\xe0\x4f\x11\x2f\xc5\xb6\xae\xb3\x93\x21\x72\x0f\x24\x10\xcd\xaa\x96\x95\x91\x5a\xfd\x3a\xe4\xe9\xe9\x10\x8a\x25\x97\xc5\x16\x3a\x1e\x9f\x0f\x41\xec\xa9\x12\x7f\x12\xf2\x75\x59\x71\xb5\xcf\x01\x48\x51\xe8\x1f\x22\x0f\x74\xc9\xa5\x6a\xc0\x88\x47\xd3\x2d\x50\xf5\x20\x8d\x78\x66\xcc\xc7\xf1\xd0\xfe\x74\x75\x2f\x4a\xf1\xc2\xbf\x5d\xec\x3a\xa1\x73\x92\xdc\xc2\x17\xbc\x05\x97\xe6\x5e\xef\x59\x44\xbf\x66\x68\x5f\xda\x52\xdd\xf6\xd9\xaf\xb5\x2f\x65\xfe\xb8\x30\x6d\x4c\x16\xd2\x56\xb3\x90\x39\xb8\x9b\xc2\x06\xb9\xb5\x4d\xc1\x82\x1b\x70\x37\x81\x18\xe4\x56\x36\x53\x96\xdb\xc4\x6b\x90\xcb\x6d\x5e\x2c\xb7\x89\xce\x20\xd7\xd8\x36\xd8\xfa\x36\x1d\xf1\x1c\x0f\x30\xba\xa4\x11\x4e\xa9\x52\x3a\xb8\xd8\xb6\xc5\xbf\x22\x49\x8a\x6c\xba\x36\x77\xe7\xe5\xf2\x64\xe2\x38\x29\x32\xf8\x5c\xd5\xa2\xe2\xb5\xc8\x53\xc3\x8d\x28\x85\x32\x30\x05\x37\xc5\x10\x7d\x06\x74\xd6\x5d\x94\xee\x69\x1b\xdf\x2d\xf8\x71\x16\x31\xf7\x3f\x0f\x66\x49\x3c\x07\x1a\xcd\xe2\x64\x4e\x18\x8d\xa3\x45\xea\x5f\xe1\x9c\x7c\xf0\xe3\x30\x9b\x47\xe9\x76\xdf\xb7\x2b\x4c\x10\x0c\x5f\x16\x62\xa1\xda\xa6\x4f\x61\x64\xaf\xe2\x68\x8b\x90\x28\xe8\x01\x7b\x2c\x0e\x53\x08\x08\x23\x17\x24\x45\xd7\xfb\x8d\x5a\xe9\x62\x5d\xaa\xad\x8e\x0d\x53\x5c\x09\xd5\x79\xd4\x29\x7a\xf0\x09\x8e\xba\x9e\x8d\xfa\xa2\x8f\x47\xfd\x6f\x12\x32\x4c\xfa\xe9\xd0\xcd\x03\x12\x04\xf0\x42\x06\x96\x5a\x17\x93\x91\xe3\x79\x13\xc7\xb9\x4e\xf0\x9a\x24\x08\xbc\x30\xa2\xa6\x77\x91\x36\xf8\x28\x1b\xd3\x74\xe7\xdf\xed\xe1\xc4\xc1\x1b\xf4\x33\xb6\xbb\x63\xe2\x04\x48\xc2\x30\xf6\xdb\x01\xf5\x9a\xec\xbf\xe3\x4d\xc8\x1b\xd3\x6a\xd1\x95\x56\xdd\xd5\x38\xd4\x9e\x5d\xa5\x7e\x9a\xbe\x7b\xf4\x46\x8f\x9e\x7d\x2a\x0e\x35\xe7\xb5\xaf\xcd\xbb\x37\x6f\xf4\xe6\xb2\xd6\xeb\xca\xd7\xaa\x31\x35\x97\x4a\xe4\x87\x1a\xf4\x52\x07\x8c\x54\x4f\xed\x5f\x91\xe3\xbf\xe7\xd1\xcf\x00\x00\x00\xff\xff\x18\x00\xd6\x8a\xa6\x09\x00\x00")
func mysql000001_create_teamsUpSqlBytes() ([]byte, error) {
return bindataRead(
......@@ -144,7 +144,7 @@ func mysql000002_create_team_membersDownSql() (*asset, error) {
return a, nil
}
var _mysql000002_create_team_membersUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x95\x5f\x6b\xdb\x30\x14\xc5\xdf\xfd\x29\xee\x5b\xac\x51\x46\x57\x4a\x19\x84\x8c\x29\xf6\x4d\x23\x66\xcb\x41\x92\x59\xfb\x14\x94\xf8\x76\x35\x58\x4e\xb1\x95\xd1\x7d\xfb\xe1\x3f\xc9\x3a\xba\x75\x0f\xeb\xd8\x28\xf3\x83\xb1\x75\x8f\x8e\x2e\xe7\x77\xb1\x23\x85\xdc\x20\x18\x3e\x4f\x10\xc4\x02\x64\x66\x00\xaf\x84\x36\x1a\x0c\x59\x97\x92\xdb\x50\xd3\x42\x18\x00\x40\xbf\x22\x0a\xf8\x6c\x9b\xed\xad\x6d\xc2\xb3\x0b\xd6\xeb\x65\x9e\x24\x27\xbd\x20\x6f\xa9\x79\x52\xa0\x76\x15\xb5\xc7\xfa\xc5\x39\x1b\x96\x63\xaa\xc8\x13\xf7\xb0\x29\x3f\x95\xb5\x0f\xcf\x4e\xc7\xc2\x4a\x89\x94\xab\x6b\xf8\x80\xd7\x10\x0e\xc7\x9f\x8c\xa7\x8c\x8a\xae\x52\x16\xf7\x6b\x4f\xd6\xb9\xa1\xdb\xfe\x79\x5d\x16\x87\x1d\x4f\x28\xf7\x2d\x35\xbd\xf2\x97\x9e\x45\xdf\xe2\xda\x7a\x08\x0f\xdd\xb2\x80\x01\xca\x4b\x21\x71\x26\xea\x7a\x17\xcf\x21\xc6\x05\xcf\x13\x03\xd1\x92\x2b\x8d\x66\xb6\xf7\x37\x6f\xdd\xe6\x7c\x1a\x04\x1a\x0d\xbc\xbf\x6b\xe8\xce\x36\x54\x68\x6f\x3d\x39\xaa\x3d\xcc\x20\xd4\x98\x60\x64\x40\x2c\x86\x8c\x87\x7b\x77\x8d\x85\x28\xcb\xa5\x09\x5f\x31\x58\xa8\x2c\x05\x21\x17\x99\x4a\xb9\x11\x99\x5c\xeb\x68\x89\x29\x7f\x1d\x65\x49\x9e\x4a\x7d\xdc\xf7\x71\x89\x0a\xc1\xdb\x4d\x45\xeb\xda\x3a\x82\x19\x4c\x1e\xb0\x9c\x1c\x85\x5c\xc6\xa3\xac\xdd\xde\x92\xb3\x30\x83\x98\x1b\x3e\xe7\x1a\x43\xf6\x9d\x6a\xbb\xab\xf6\xae\x3e\xba\xe9\x4e\x4e\x5d\x64\x83\x19\x83\x77\x70\x3a\x44\x37\x19\xbb\x7e\x33\x19\xdf\x79\x62\x50\x8d\xf3\xf5\x70\xa2\x78\x1c\xc3\x37\x1f\xf0\x65\xfd\xa5\x23\x7f\xce\xa6\x93\x80\xb1\x69\x10\xac\x14\xae\xb8\x42\xb0\x95\xa7\x46\xdc\xc8\x9d\xc7\xfb\xb2\xf5\xed\x90\xc3\xe3\x2c\xa7\x01\x5e\x61\x94\x9b\xc7\x3b\xa6\x41\x8c\x3c\x49\xb2\xa8\x9b\xf4\x9f\xd9\xbe\x4c\x46\xbc\x70\x65\xfd\x1c\x90\x7a\xa3\xff\x94\xfe\x0c\xa5\xcb\x3d\xb5\xfe\x39\x28\xf5\x46\xff\x04\xa5\x97\x85\xe9\xf0\xc5\xff\x3d\x46\x3f\xf8\xcb\xfd\x35\x40\x5f\x03\x00\x00\xff\xff\x57\xa0\xc2\x52\xf8\x07\x00\x00")
var _mysql000002_create_team_membersUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x95\x5f\x6b\xdb\x30\x14\xc5\xdf\xfd\x29\xee\x5b\xac\x51\x46\x57\x42\x19\x84\x8c\x29\xf6\x4d\x23\x66\xcb\x41\x92\x59\xfb\x64\x94\xf8\x76\x35\x44\x4e\xb1\x95\xd1\x7d\xfb\xe1\x3f\xcd\x3a\xba\x3f\x0f\xeb\xd8\x28\xcd\x43\xc0\xba\x47\xe7\x5e\xce\xef\x62\x47\x0a\xb9\x41\x30\x7c\x91\x20\x88\x25\xc8\xcc\x00\x5e\x0a\x6d\x34\x18\xb2\x2e\x25\xb7\xa1\xa6\x85\x30\x00\x80\xfe\x44\x94\xf0\xd9\x36\xdb\x1b\xdb\x84\x67\xe7\xac\xd7\xcb\x3c\x49\x4e\x7a\x41\xde\x52\xf3\x4b\x81\xda\xef\xa8\x3d\xd6\xcf\xa7\x6c\x38\x8e\x69\x47\x9e\xb8\x87\x4d\xf5\xa9\xaa\x7d\x78\x76\x3a\x16\xd6\x4a\xa4\x5c\x5d\xc1\x07\xbc\x82\x70\x68\x7f\x32\x76\x19\x15\x5d\xa5\x2a\xef\x0a\x4f\xd6\xb9\x61\xda\xe2\xd0\x52\x53\x54\x25\x84\xbf\x55\x96\x7d\xe3\xc2\x7a\x08\xef\x67\x60\x01\x03\x94\x17\x42\xe2\x5c\xd4\xf5\x3e\x5e\x40\x8c\x4b\x9e\x27\x06\xa2\x15\x57\x1a\xcd\xfc\xe0\xaf\xdf\xba\xcd\x74\x16\x04\x1a\x0d\xbc\xbf\x6d\xe8\xd6\x36\x54\x6a\x6f\x3d\x39\xaa\x3d\xcc\x21\xd4\x98\x60\x64\x40\x2c\x87\xe4\x86\xff\xee\x37\x16\xa2\x2c\x97\x26\x7c\xc5\x60\xa9\xb2\x14\x84\x5c\x66\x2a\xe5\x46\x64\xb2\xd0\xd1\x0a\x53\xfe\x3a\xca\x92\x3c\x95\xfa\x78\xef\xe3\x0a\x15\x82\xb7\x9b\x1d\x15\xb5\x75\x04\x73\x98\x3c\x20\x34\x39\x0a\xb9\x8c\x47\x59\xbb\xbd\x21\x67\x61\x0e\x31\x37\x7c\xc1\x35\x86\xec\x3b\xd5\x76\xbf\x3b\xb8\xfa\xe8\xa6\x3b\x39\x75\x91\x0d\x66\x0c\xde\xc1\xe9\x10\xdd\x64\x9c\xfa\xcd\x64\x7c\xe6\x89\x41\x35\x6e\xcd\xc3\x3d\xe1\x71\x0c\xdf\x7c\xc0\x57\xf5\x97\x8e\xe7\x94\xcd\x26\x01\x63\xb3\x20\x58\x2b\x5c\x73\x85\x60\x77\x9e\x1a\x71\x2d\xf7\x1e\xef\xaa\xd6\xb7\x43\x0e\x8f\xb3\x9c\x05\x78\x89\x51\x6e\x1e\xdf\x98\x05\x31\xf2\x24\xc9\xa2\x6e\x7f\x7f\x66\xfb\x3c\x19\xf1\xd2\x55\xf5\x53\x40\xea\x8d\x5e\x28\xfd\x1d\x4a\x17\x07\x6a\xfd\x53\x50\xea\x8d\xfe\x0b\x4a\xcf\x0b\xd3\xfd\x1b\xff\xcf\x18\xfd\xe0\xdb\xf5\xcf\x00\x7d\x0d\x00\x00\xff\xff\x9d\xc6\xab\x58\xce\x07\x00\x00")
func mysql000002_create_team_membersUpSqlBytes() ([]byte, error) {
return bindataRead(
......@@ -164,7 +164,7 @@ func mysql000002_create_team_membersUpSql() (*asset, error) {
return a, nil
}
var _postgres000001_create_teamsDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\xd0\xb1\x0e\xc2\x20\x10\x06\xe0\x9d\xa7\xe0\x3d\x98\xaa\xc5\xa4\x49\x6d\x4d\x5b\x93\x6e\x84\xc0\x45\x2f\xa1\x40\x80\xaa\x8f\x6f\x2c\x83\x6e\xc5\xf9\xbe\xff\x72\xff\x55\xed\xc4\x07\x3a\x55\x87\x96\xd3\x04\x72\x89\xb4\x1e\xfa\x0b\x3d\xf6\xed\xf5\xdc\xd1\xe6\x44\xf9\xdc\x8c\xd3\x48\xa5\x31\xee\xe9\x3c\x58\xb4\x0f\x4c\xc0\x48\x69\xd0\xc8\x98\x3e\x73\x54\xce\xae\x5e\xcb\x7f\xb2\x1a\xa2\x0a\xe8\x13\x3a\x5b\x1e\xba\x05\xb7\x7a\xe5\x6c\x4c\x41\xa2\x05\xcd\x08\xd9\x60\xd3\xd5\x7c\xfe\x71\xa8\x5f\x62\xdb\x23\xac\x5c\x80\xed\xa1\xdc\x5b\xa0\xde\x95\xb9\xa5\x90\x69\x57\xaa\x00\x85\x52\x83\x81\x32\x19\xd5\x1d\x96\x7c\x67\xa6\xf9\x63\x5f\xba\x31\x46\xde\x01\x00\x00\xff\xff\x5c\x01\x7e\x15\xf9\x01\x00\x00")
var _postgres000001_create_teamsDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\xd0\xb1\x0e\xc2\x20\x10\x06\xe0\x9d\xa7\xe0\x3d\x98\xaa\xc5\xa4\x49\x6d\x4d\x5b\x93\x6e\x84\xc0\x45\x2f\xa1\x40\x80\xaa\x8f\x6f\x2c\x83\x6e\xc5\xf9\xbe\xff\x72\xff\x55\xed\xc4\x07\x3a\x55\x87\x96\xd3\x04\x72\x89\xb4\x1e\xfa\x0b\x3d\xf6\xed\xf5\xdc\xd1\xe6\x44\xf9\xdc\x8c\xd3\x48\xa5\x31\xee\xe9\x3c\x58\xb4\x0f\x4c\xc0\x48\x69\xd0\xc8\x98\x3e\x73\x54\xce\xae\x5e\xcb\x7f\xb2\x1a\xa2\x0a\xe8\x13\x3a\x5b\x1e\xba\x05\xb7\x7a\xe5\x6c\x4c\x41\xa2\x05\xcd\x08\xd9\x60\xd3\xd5\x7c\xfe\x71\xa8\x5f\x62\xdb\x23\x72\x25\x81\x9a\xed\xc9\x5c\x40\xc8\xb4\x2b\x55\x80\x42\xa9\xc1\x40\x99\x8c\xea\x0e\x4b\xbe\x33\xd3\xfc\x8c\x2f\xdd\x18\x23\xef\x00\x00\x00\xff\xff\x38\xaf\xff\x77\xd4\x01\x00\x00")
func postgres000001_create_teamsDownSqlBytes() ([]byte, error) {
return bindataRead(
......@@ -184,7 +184,7 @@ func postgres000001_create_teamsDownSql() (*asset, error) {
return a, nil
}
var _postgres000001_create_teamsUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x93\x4f\x6f\xb2\x40\x10\xc6\xef\x7c\x8a\x39\x4a\xf2\x1e\x7c\x6d\x35\x4d\x3c\x51\xdd\xa6\xa4\x8a\x2d\x62\xa3\x27\xb2\xb2\x13\x3b\x09\xec\x12\x58\xdb\xfa\xed\x1b\xd9\x45\xc5\x3f\x09\x5e\x9f\x67\xf9\xcd\x30\xcf\xcc\x28\x64\x5e\xc4\x20\xf2\x9e\x27\x0c\xfc\x17\x08\x66\x11\xb0\xa5\x3f\x8f\xe6\xa0\x91\x67\x25\x74\x1c\x00\x00\x12\xf0\xe9\x85\xa3\x57\x2f\xec\xf4\x06\x2e\xbc\x87\xfe\xd4\x0b\x57\xf0\xc6\x56\xff\x2a\x3f\x29\x90\x6b\xe4\x1a\xd6\xb4\x21\xa9\x8d\xb8\xcd\xc5\xa5\x28\x30\xc5\x4b\x91\xca\x3c\xe5\x3b\xc9\x33\x3c\xd4\x19\x3c\xba\xc6\xbc\xae\x0a\x2c\x93\x82\x72\x4d\x4a\x1e\x5b\xeb\xf7\xad\x8b\x19\xa7\xf4\xa0\xff\xef\x3d\x59\x5d\xef\x72\xbc\xf2\x3c\x51\x59\xce\xe5\x8d\xfa\x3c\x4d\xd5\x0f\x0a\xa1\x32\x4e\xb2\x3c\x42\xbb\xdd\xae\x7d\x41\xf2\x9b\x34\x9e\xcc\xe8\xa1\x67\x9d\x32\xf9\xc2\x0c\x9b\xd3\x33\xce\x22\xf0\x3f\x16\xac\xb3\x2f\xe9\x3a\xee\xd0\x71\x6c\x12\x7e\x30\x66\xcb\xb3\x24\x48\xfc\xc6\x55\x1a\x71\xd5\xe1\x2c\xa8\xb3\xa9\xbe\x86\x61\xbb\x6f\x4d\x97\x31\x89\x13\x40\xdd\xb9\xdb\x92\x61\x22\x8d\xb9\x3e\x61\xd4\x31\xb7\x65\x98\x5d\x69\x32\xea\xfd\x69\xcb\x30\x5b\xd4\x64\xd4\x9b\xd5\x96\x61\xb2\x69\xce\xa3\xce\x6b\x1f\x88\x37\x89\x58\x68\x2f\xc3\xd8\xde\x78\x0c\xa3\xd9\x64\x31\x0d\xce\xa0\xd5\x8a\xa8\x1c\xa5\x99\x27\xac\x95\x4a\x91\xcb\xe1\x3d\x8c\x94\x97\x7a\xff\x84\x12\x25\xcd\x48\xed\x89\xdc\x45\xb9\x75\x16\x77\x41\x36\x85\xda\xe6\x89\x92\xa5\x2e\x38\x49\x14\xc7\xff\xf9\x0b\x00\x00\xff\xff\xd9\x46\x12\x20\x2f\x04\x00\x00")
var _postgres000001_create_teamsUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x92\x4f\x6f\xe2\x30\x14\xc4\xef\xf9\x14\xef\x48\xa4\x3d\xb0\xec\x82\x56\xe2\x94\x05\x57\x8d\x0a\xa1\x0d\xa1\x82\x53\x64\xe2\x27\xfa\xa4\xc4\x8e\x62\xd3\x96\x6f\x5f\x81\x1d\x20\xfc\x91\xc2\x75\xc6\xfa\xbd\x64\x66\x46\x31\x0b\x12\x06\x49\xf0\x7f\xc2\x20\x7c\x82\x68\x96\x00\x5b\x86\xf3\x64\x0e\x06\x79\xa1\xa1\xe3\x01\x00\x90\x80\xf7\x20\x1e\x3d\x07\x71\xa7\x37\xf0\xe1\x35\x0e\xa7\x41\xbc\x82\x17\xb6\xfa\x75\xf0\xb3\x0a\xb9\x41\x6e\x60\x4d\x1b\x92\xc6\x8a\xdb\x52\x5c\x8b\x02\x73\xbc\x16\x49\x97\x39\xdf\x49\x5e\xe0\xf1\xce\xe0\xaf\x6f\xcd\xdb\xaa\x40\x9d\x55\x54\x1a\x52\xf2\xf4\x69\xfd\xbe\x73\xb1\xe0\x94\x1f\xf5\xdf\xbd\x7f\x4e\x37\xbb\x12\x6f\x3c\xcf\x54\x51\x72\x79\xe7\x3e\xcf\x73\xf5\x85\x42\xa8\x82\x93\xd4\x27\x68\xb7\xdb\x75\x2f\x48\x7e\x92\xc1\xb3\x8c\xfe\xf4\x9c\xa3\xb3\x0f\x2c\xb0\x99\x9e\x75\x16\x51\xf8\xb6\x60\x9d\xfd\x49\xdf\xf3\x87\x9e\xe7\x9a\x08\xa3\x31\x5b\x5e\x34\x41\xe2\x3b\x3d\xb4\x91\xda\x4b\x29\x09\x98\x45\x75\x41\xf5\x75\x7f\xd8\x8e\x61\x6b\x49\xb9\x39\x63\xd4\x55\xb5\x65\xd8\xbe\x9b\x8c\x7a\x03\x6d\x19\x76\x09\x4d\x46\xbd\x8e\xb6\x0c\x9b\x6f\x33\x8f\x3a\xf3\x7d\xa8\xc1\x24\x61\xb1\x5b\xb7\xb5\x83\xf1\x18\x46\xb3\xc9\x62\x1a\x5d\x40\x0f\x35\xab\x12\xa5\xcd\x13\xd6\x4a\xe5\xc8\xe5\xf0\x11\x46\xce\xb5\xd9\x3f\xa1\x4c\x49\x1b\xa9\x9b\xf9\x43\x94\x7b\xd3\x7e\x08\xb2\xa9\xd4\xb6\xcc\x94\xd4\xa6\xe2\x24\x51\x9c\xfe\xe7\x27\x00\x00\xff\xff\x07\xd8\x47\xb0\xf3\x03\x00\x00")
func postgres000001_create_teamsUpSqlBytes() ([]byte, error) {
return bindataRead(
......@@ -204,7 +204,7 @@ func postgres000001_create_teamsUpSql() (*asset, error) {
return a, nil
}
var _postgres000002_create_team_membersDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\x28\x49\x4d\xcc\xcd\x4d\xcd\x4d\x4a\x2d\x2a\x56\x70\x09\xf2\x0f\x50\x70\xf6\xf7\x09\xf5\xf5\x53\xf0\x74\x53\x70\x8d\xf0\x0c\x0e\x09\x56\x28\x4e\xce\x48\xcd\x4d\x2d\x2d\x4e\x2d\xb2\xe6\x22\x47\x67\x62\x4a\x6e\x66\x1e\x79\x5a\xd3\x4b\x53\x8b\x4b\x48\xd5\x9a\x92\x9a\x93\x5a\x92\x9a\x58\x62\xcd\xc5\x05\x56\xe0\xe9\xe7\xe2\x1a\x81\x24\x9f\x99\x52\x11\x8f\x64\x0a\x98\x1d\x9f\x99\x62\x4d\x9c\x6a\x50\x38\x10\xaf\x1a\xe2\x96\x78\x84\x63\x20\x9e\x40\x68\x08\x49\x4d\xcc\xf5\x85\x28\xb6\xe6\x02\x04\x00\x00\xff\xff\x79\x56\x1c\x35\x98\x01\x00\x00")
var _postgres000002_create_team_membersDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x8f\xb1\x0a\xc2\x30\x14\x45\xf7\x7c\xc5\xfb\x8f\x4c\xd5\x46\x08\xa4\xad\xb4\x11\xba\x85\x68\x2e\x1a\xf0\x39\x34\x29\xf8\xf9\xa2\x19\xda\xd1\x76\x7e\xe7\x1c\xde\xad\x8c\x55\x3d\xd9\xea\x60\x14\x65\x78\x66\xf0\x15\x53\xa2\xba\xef\xce\x74\xec\xcc\xa5\x69\x49\x9f\x48\x8d\x7a\xb0\x03\xa5\xdb\x03\x8c\x39\x61\x92\x62\x8f\xe9\x03\xc7\xd7\x3e\xf5\x3e\x23\xe5\xad\x6a\xc0\x13\x19\x3e\x4b\x21\x7e\x80\x6e\x6b\x35\xae\xee\x31\xbc\xdd\xaa\xe2\xbe\xcb\x5c\x0c\xf2\x3f\xba\xd4\xdd\x92\x2f\x6f\x2d\x82\x85\xe7\xa6\xc0\x52\x7c\x02\x00\x00\xff\xff\xc2\x6e\xba\x19\x6a\x01\x00\x00")
func postgres000002_create_team_membersDownSqlBytes() ([]byte, error) {
return bindataRead(
......@@ -224,7 +224,7 @@ func postgres000002_create_team_membersDownSql() (*asset, error) {
return a, nil
}
var _postgres000002_create_team_membersUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x92\x31\x6b\xf3\x30\x10\x86\x77\xff\x8a\x1b\x2d\xc8\xf4\xf1\x91\xc5\x93\x6a\xab\xd4\x54\x96\x8b\xa2\x94\x64\x32\x72\x75\xa4\x02\xcb\x06\x4b\x81\xfe\xfc\x62\xcb\x29\xc1\x2d\x85\x34\x9b\x38\x1d\xcf\x3d\xaf\x4e\xb9\x64\x54\x31\x50\xf4\x81\x33\x28\x1f\x41\xd4\x0a\xd8\xa1\xdc\xa9\x1d\x04\xd4\xce\xa1\x6b\x71\xf4\x90\x26\x00\x30\x57\xac\x81\x57\x2a\xf3\x27\x2a\xd3\x7f\x5b\x32\xf7\x8b\x3d\xe7\x9b\xb9\xe1\xec\x71\xfc\xb5\x61\x1c\x3a\xf4\x5f\xf7\xdb\xff\x24\x96\x0d\x76\x18\x50\x07\x68\xed\xc9\xf6\x21\x16\x5f\x64\x59\x51\x79\x84\x67\x76\x84\x34\x8e\xde\x2c\x13\x48\x42\xb2\x24\x59\xdc\x4b\x51\xb0\xc3\xca\xdd\x9a\x8f\xe6\xca\x7f\x3e\x37\xd6\x40\x2d\x40\xa1\x76\xd5\x25\x56\xc4\x92\xec\x16\xd6\xa4\xf0\x13\x6b\x51\xbb\x89\x15\x83\x37\x3a\x7c\xa3\x5d\x9e\x64\x0a\x4a\xb9\x62\x72\xd9\xd1\xf5\x56\x68\x51\x40\x5e\xf3\x7d\x25\x56\x63\xfc\xdb\x3b\x3a\x9c\x84\xa0\x1d\x86\x0e\x75\x9f\xfd\x15\xa2\x8d\xb3\xfd\xdd\x94\xd3\x19\x7d\xb8\x83\xb2\xfa\x20\x59\xf2\x19\x00\x00\xff\xff\x00\x64\x8f\x9f\xb8\x02\x00\x00")
var _postgres000002_create_team_membersUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x91\x41\x6b\x83\x30\x14\xc7\xef\xf9\x14\xef\xa8\xd0\xd3\x18\xbd\x78\xca\x34\x63\xb2\x18\x47\x9a\x8e\xf6\x24\x71\x79\x74\x01\xa3\x60\x52\xd8\xc7\x1f\x6a\x3a\x8a\x83\xc1\xda\xeb\xf3\xef\xef\xff\x7b\x2f\xb9\x64\x54\x31\x50\xf4\x89\x33\x28\x9f\x41\xd4\x0a\xd8\xa1\xdc\xa9\x1d\x04\xd4\xce\xa1\x6b\x71\xf4\x90\x10\x00\x98\x27\xd6\xc0\x3b\x95\xf9\x0b\x95\xc9\xc3\x36\x9d\xf3\x62\xcf\xf9\x66\x0e\x9c\x3d\x8e\x7f\x06\xc6\xa1\x43\xff\xf3\x7d\xfb\x98\x2e\x63\x83\x1d\x06\xd4\x01\x5a\x7b\xb2\x7d\x58\x86\x6f\xb2\xac\xa8\x3c\xc2\x2b\x3b\x42\xb2\x54\x6f\x62\x43\x4a\xd2\x8c\x90\xe8\x5e\x8a\x82\x1d\x56\xee\xd6\x7c\x35\x57\xfe\xcd\xf4\x5b\x63\x0d\xd4\x02\x14\x6a\x57\x5d\xd6\x8a\xb8\xec\x3f\xac\x45\xb6\xd1\xe1\x17\xed\xb2\xc6\x24\x47\xb9\x62\x32\xde\xf5\xfa\x92\xb4\x28\x20\xaf\xf9\xbe\x12\xab\x1a\xff\xf1\x89\x0e\x27\x21\x68\x87\xa1\x43\xdd\x67\xb7\x42\xb4\x71\xb6\xbf\x9b\x72\x3a\xa3\x0f\x77\x50\x56\x8f\x9a\x91\xef\x00\x00\x00\xff\xff\x05\x9d\xdf\xdf\x6c\x02\x00\x00")
func postgres000002_create_team_membersUpSqlBytes() ([]byte, error) {
return bindataRead(
......
......@@ -14,7 +14,6 @@ CREATE TABLE IF NOT EXISTS Teams (
SchemeId varchar(26) DEFAULT NULL,
PRIMARY KEY (Id),
UNIQUE KEY Name (Name),
KEY idx_teams_name (Name),
KEY idx_teams_invite_id (InviteId),
KEY idx_teams_update_at (UpdateAt),
KEY idx_teams_create_at (CreateAt),
......
......@@ -4,7 +4,6 @@ CREATE TABLE IF NOT EXISTS TeamMembers (
Roles varchar(64),
DeleteAt bigint(20),
PRIMARY KEY (TeamId, UserId),
KEY idx_teammembers_team_id (TeamId),
KEY idx_teammembers_user_id (UserId),
KEY idx_teammembers_delete_at (DeleteAt)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
......
......@@ -3,7 +3,6 @@ ALTER TABLE teams DROP COLUMN IF EXISTS lastteamiconupdate;
ALTER TABLE teams DROP COLUMN IF EXISTS description;
ALTER TABLE teams DROP COLUMN IF EXISTS groupconstrained;
DROP INDEX IF EXISTS idx_teams_name;
DROP INDEX IF EXISTS idx_teams_invite_id;
DROP INDEX IF EXISTS idx_teams_update_at;
DROP INDEX IF EXISTS idx_teams_create_at;
......
......@@ -15,7 +15,6 @@ CREATE TABLE IF NOT EXISTS teams (
UNIQUE(name)
);
CREATE INDEX IF NOT EXISTS idx_teams_name ON teams (name) ;
CREATE INDEX IF NOT EXISTS idx_teams_invite_id ON teams (inviteid);
CREATE INDEX IF NOT EXISTS idx_teams_update_at ON teams (updateat);
CREATE INDEX IF NOT EXISTS idx_teams_create_at ON teams (createat);
......
......@@ -3,7 +3,6 @@ ALTER TABLE teammembers DROP COLUMN IF EXISTS schemeadmin;
ALTER TABLE teammembers DROP COLUMN IF EXISTS schemeguest;
ALTER TABLE teammembers DROP COLUMN IF EXISTS deleteat;
DROP INDEX IF EXISTS idx_teammembers_team_id;
DROP INDEX IF EXISTS idx_teammembers_user_id;
DROP INDEX IF EXISTS idx_teammembers_delete_at;
......
......@@ -6,7 +6,6 @@ CREATE TABLE IF NOT EXISTS teammembers (
PRIMARY KEY (teamid, userid)
);
CREATE INDEX IF NOT EXISTS idx_teammembers_team_id ON TeamMembers (teamid);
CREATE INDEX IF NOT EXISTS idx_teammembers_user_id ON TeamMembers (userid);
CREATE INDEX IF NOT EXISTS idx_teammembers_delete_at ON TeamMembers (deleteat);
......
......@@ -421,7 +421,6 @@ func newSqlChannelStore(sqlStore *SqlStore, metrics einterfaces.MetricsInterface
func (s SqlChannelStore) createIndexesIfNotExists() {
s.CreateIndexIfNotExists("idx_channels_team_id", "Channels", "TeamId")
s.CreateIndexIfNotExists("idx_channels_name", "Channels", "Name")
s.CreateIndexIfNotExists("idx_channels_update_at", "Channels", "UpdateAt")
s.CreateIndexIfNotExists("idx_channels_create_at", "Channels", "CreateAt")
s.CreateIndexIfNotExists("idx_channels_delete_at", "Channels", "DeleteAt")
......@@ -431,13 +430,11 @@ func (s SqlChannelStore) createIndexesIfNotExists() {
s.CreateIndexIfNotExists("idx_channels_displayname_lower", "Channels", "lower(DisplayName)")
}
s.CreateIndexIfNotExists("idx_channelmembers_channel_id", "ChannelMembers", "ChannelId")
s.CreateIndexIfNotExists("idx_channelmembers_user_id", "ChannelMembers", "UserId")
s.CreateFullTextIndexIfNotExists("idx_channel_search_txt", "Channels", "Name, DisplayName, Purpose")
s.CreateIndexIfNotExists("idx_publicchannels_team_id", "PublicChannels", "TeamId")
s.CreateIndexIfNotExists("idx_publicchannels_name", "PublicChannels", "Name")
s.CreateIndexIfNotExists("idx_publicchannels_delete_at", "PublicChannels", "DeleteAt")
if s.DriverName() == model.DATABASE_DRIVER_POSTGRES {
s.CreateIndexIfNotExists("idx_publicchannels_name_lower", "PublicChannels", "lower(Name)")
......
......@@ -42,7 +42,6 @@ func (es SqlEmojiStore) createIndexesIfNotExists() {
es.CreateIndexIfNotExists("idx_emoji_update_at", "Emoji", "UpdateAt")
es.CreateIndexIfNotExists("idx_emoji_create_at", "Emoji", "CreateAt")
es.CreateIndexIfNotExists("idx_emoji_delete_at", "Emoji", "DeleteAt")
es.CreateIndexIfNotExists("idx_emoji_name", "Emoji", "Name")
}
func (es SqlEmojiStore) Save(emoji *model.Emoji) (*model.Emoji, error) {
......
......@@ -55,10 +55,8 @@ func newSqlOAuthStore(sqlStore *SqlStore) store.OAuthStore {
func (as SqlOAuthStore) createIndexesIfNotExists() {
as.CreateIndexIfNotExists("idx_oauthapps_creator_id", "OAuthApps", "CreatorId")
as.CreateIndexIfNotExists("idx_oauthaccessdata_client_id", "OAuthAccessData", "ClientId")
as.CreateIndexIfNotExists("idx_oauthaccessdata_user_id", "OAuthAccessData", "UserId")
as.CreateIndexIfNotExists("idx_oauthaccessdata_refresh_token", "OAuthAccessData", "RefreshToken")
as.CreateIndexIfNotExists("idx_oauthauthdata_client_id", "OAuthAuthData", "Code")
}
func (as SqlOAuthStore) SaveApp(app *model.OAuthApp) (*model.OAuthApp, error) {
......
......@@ -101,7 +101,6 @@ func (s *SqlPostStore) createIndexesIfNotExists() {
s.CreateIndexIfNotExists("idx_posts_update_at", "Posts", "UpdateAt")
s.CreateIndexIfNotExists("idx_posts_create_at", "Posts", "CreateAt")
s.CreateIndexIfNotExists("idx_posts_delete_at", "Posts", "DeleteAt")
s.CreateIndexIfNotExists("idx_posts_channel_id", "Posts", "ChannelId")
s.CreateIndexIfNotExists("idx_posts_root_id", "Posts", "RootId")
s.CreateIndexIfNotExists("idx_posts_user_id", "Posts", "UserId")
s.CreateIndexIfNotExists("idx_posts_is_pinned", "Posts", "IsPinned")
......
......@@ -33,7 +33,6 @@ func newSqlPreferenceStore(sqlStore *SqlStore) store.PreferenceStore {
}
func (s SqlPreferenceStore) createIndexesIfNotExists() {
s.CreateIndexIfNotExists("idx_preferences_user_id", "Preferences", "UserId")
s.CreateIndexIfNotExists("idx_preferences_category", "Preferences", "Category")
s.CreateIndexIfNotExists("idx_preferences_name", "Preferences", "Name")
}
......
......@@ -31,11 +31,7 @@ func newSqlProductNoticesStore(sqlStore *SqlStore) store.ProductNoticesStore {
func (s SqlProductNoticesStore) createIndexesIfNotExists() {
s.CreateIndexIfNotExists("idx_notice_views_timestamp", "ProductNoticeViewState", "Timestamp")
s.CreateIndexIfNotExists("idx_notice_views_user_id", "ProductNoticeViewState", "UserId")
s.CreateIndexIfNotExists("idx_notice_views_notice_id", "ProductNoticeViewState", "NoticeId")
s.CreateCompositeIndexIfNotExists("idx_notice_views_user_notice", "ProductNoticeViewState", []string{"UserId", "NoticeId"})
}
func (s SqlProductNoticesStore) Clear(notices []string) error {
......
......@@ -48,8 +48,7 @@ func newSqlRetentionPolicyStore(sqlStore *SqlStore, metrics einterfaces.MetricsI
}
func (s *SqlRetentionPolicyStore) createIndexesIfNotExists() {
s.CreateCompositeIndexIfNotExists("IDX_RetentionPolicies_DisplayName_Id", "RetentionPolicies",
[]string{"DisplayName", "Id"})
s.CreateIndexIfNotExists("IDX_RetentionPolicies_DisplayName", "RetentionPolicies", "DisplayName")
s.CreateIndexIfNotExists("IDX_RetentionPoliciesChannels_PolicyId", "RetentionPoliciesChannels", "PolicyId")
s.CreateIndexIfNotExists("IDX_RetentionPoliciesTeams_PolicyId", "RetentionPoliciesTeams", "PolicyId")
s.CreateForeignKeyIfNotExists("RetentionPoliciesChannels", "PolicyId", "RetentionPolicies", "Id", true)
......
......@@ -65,7 +65,6 @@ func newSqlSharedChannelStore(sqlStore *SqlStore) store.SharedChannelStore {
}
func (s SqlSharedChannelStore) createIndexesIfNotExists() {
s.CreateIndexIfNotExists("idx_sharedchannelusers_user_id", "SharedChannelUsers", "UserId")
s.CreateIndexIfNotExists("idx_sharedchannelusers_remote_id", "SharedChannelUsers", "RemoteId")
}
......
......@@ -33,7 +33,6 @@ func newSqlStatusStore(sqlStore *SqlStore) store.StatusStore {
}
func (s SqlStatusStore) createIndexesIfNotExists() {
s.CreateIndexIfNotExists("idx_status_user_id", "Status", "UserId")
s.CreateIndexIfNotExists("idx_status_status", "Status", "Status")
}
......
......@@ -740,6 +740,30 @@ func TestMySQLReadTimeout(t *testing.T) {
require.NoError(t, err)
}
func TestRemoveIndexIfExists(t *testing.T) {
StoreTest(t, func(t *testing.T, ss store.Store) {
sqlStore := ss.(*SqlStore)
_, err := sqlStore.GetMaster().ExecNoTimeout(`CREATE INDEX idx_posts_create_at ON Posts (CreateAt)`)
require.Error(t, err)
ok := sqlStore.RemoveIndexIfExists("idx_posts_create_at", "Posts")
require.True(t, ok)
ok = sqlStore.RemoveIndexIfExists("idx_posts_create_at", "Posts")
require.False(t, ok)
_, err = sqlStore.GetMaster().ExecNoTimeout(`CREATE INDEX idx_posts_create_at ON Posts (CreateAt)`)
require.NoError(t, err)
ok = sqlStore.RemoveIndexIfExists("idx_posts_create_at", "Posts")
require.True(t, ok)
ok = sqlStore.RemoveIndexIfExists("idx_posts_create_at", "Posts")
require.False(t, ok)
})
}
func TestAlterDefaultIfColumnExists(t *testing.T) {
StoreTest(t, func(t *testing.T, ss store.Store) {
var query string
......
......@@ -20,6 +20,7 @@ import (
const (
CurrentSchemaVersion = Version5360
Version5370 = "5.37.0"
Version5360 = "5.36.0"
Version5350 = "5.35.0"
Version5340 = "5.34.0"
......@@ -208,6 +209,7 @@ func upgradeDatabase(sqlStore *SqlStore, currentModelVersionString string) error
upgradeDatabaseToVersion534(sqlStore)
upgradeDatabaseToVersion535(sqlStore)
upgradeDatabaseToVersion536(sqlStore)
upgradeDatabaseToVersion537(sqlStore)
return nil
}
......@@ -1133,7 +1135,7 @@ func rootCountMigration(sqlStore *SqlStore) {
forceIndex := ""
if sqlStore.DriverName() == model.DATABASE_DRIVER_MYSQL {
forceIndex = "FORCE INDEX(idx_posts_channel_id)"
forceIndex = "FORCE INDEX(idx_posts_channel_id_update_at)"
}
totalMsgCountRootCTE := `
SELECT Channels.Id channelid, COALESCE(COUNT(*),0) newcount, COALESCE(MAX(Posts.CreateAt), 0) as lastpost
......@@ -1179,3 +1181,29 @@ func rootCountMigration(sqlStore *SqlStore) {
}
}
}
func upgradeDatabaseToVersion537(sqlStore *SqlStore) {
// if shouldPerformUpgrade(sqlStore, Version5360, Version5370) {
sqlStore.RemoveIndexIfExists("idx_posts_channel_id", "Posts")
sqlStore.RemoveIndexIfExists("idx_channels_name", "Channels")
sqlStore.RemoveIndexIfExists("idx_publicchannels_name", "PublicChannels")
sqlStore.RemoveIndexIfExists("idx_channelmembers_channel_id", "ChannelMembers")
sqlStore.RemoveIndexIfExists("idx_emoji_name", "Emoji")
sqlStore.RemoveIndexIfExists("idx_oauthaccessdata_client_id", "OAuthAccessData")
sqlStore.RemoveIndexIfExists("idx_oauthauthdata_client_id", "OAuthAuthData")
sqlStore.RemoveIndexIfExists("idx_preferences_user_id", "Preferences")
sqlStore.RemoveIndexIfExists("idx_notice_views_user_id", "ProductNoticeViewState")
sqlStore.RemoveIndexIfExists("idx_notice_views_user_notice", "ProductNoticeViewState")
sqlStore.RemoveIndexIfExists("idx_status_user_id", "Status")
sqlStore.RemoveIndexIfExists("idx_teammembers_team_id", "TeamMembers")
sqlStore.RemoveIndexIfExists("idx_teams_name", "Teams")
sqlStore.RemoveIndexIfExists("idx_user_access_tokens_token", "UserAccessTokens")
sqlStore.RemoveIndexIfExists("idx_user_terms_of_service_user_id", "UserTermsOfService")
sqlStore.RemoveIndexIfExists("idx_users_email", "Users")
sqlStore.RemoveIndexIfExists("idx_sharedchannelusers_user_id", "SharedChannelUsers")
sqlStore.RemoveIndexIfExists("IDX_RetentionPolicies_DisplayName_Id", "RetentionPolicies")
sqlStore.CreateIndexIfNotExists("IDX_RetentionPolicies_DisplayName", "RetentionPolicies", "DisplayName")
// saveSchemaVersion(sqlStore, Version5370)
// }
}
......@@ -33,7 +33,6 @@ func newSqlUserAccessTokenStore(sqlStore *SqlStore) store.UserAccessTokenStore {
}
func (s SqlUserAccessTokenStore) createIndexesIfNotExists() {
s.CreateIndexIfNotExists("idx_user_access_tokens_token", "UserAccessTokens", "Token")
s.CreateIndexIfNotExists("idx_user_access_tokens_user_id", "UserAccessTokens", "UserId")
}
......
......@@ -82,7 +82,6 @@ func newSqlUserStore(sqlStore *SqlStore, metrics einterfaces.MetricsInterface) s
}
func (us SqlUserStore) createIndexesIfNotExists() {
us.CreateIndexIfNotExists("idx_users_email", "Users", "Email")
us.CreateIndexIfNotExists("idx_users_update_at", "Users", "UpdateAt")
us.CreateIndexIfNotExists("idx_users_create_at", "Users", "CreateAt")
us.CreateIndexIfNotExists("idx_users_delete_at", "Users", "DeleteAt")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment