mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 03:34:34 -04:00
Fixes for schema migrations and always set default country on clients
This commit is contained in:
parent
8d9950ebbd
commit
fcbef56e46
@ -58,7 +58,7 @@ class ClientRepository extends BaseRepository
|
|||||||
return $client;
|
return $client;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$client->id && (!array_key_exists('country_id', $data) || empty($data['country_id']))){
|
if(!$client->id && auth()->user() && auth()->user()->company() && (!array_key_exists('country_id', $data) || empty($data['country_id']))){
|
||||||
$data['country_id'] = auth()->user()->company()->settings->country_id;
|
$data['country_id'] = auth()->user()->company()->settings->country_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1044,7 +1044,7 @@ CREATE TABLE `migrations` (
|
|||||||
`migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
|
`migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
`batch` int(11) NOT NULL,
|
`batch` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `password_resets`;
|
DROP TABLE IF EXISTS `password_resets`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user