Greetings, I'm in the installation of my degree project, it's a web system it should be installed in the cloud, but as the institution for which the project is carried out does not have an internet service and has several offices scattered throughout the city, the system is being installed locally in each dispersed office.
Therefore I need that in each place the primary keys start from a different number to 1 (this is my idea and I'm not sure if it was ok), since in the end all the information will be centralized and I'm more than sure that doing this will give me error or replace the data with ids from another place.
Table employees
CREATE TABLE 'employers' (
'id' int(10) UNSIGNED NOT NULL,
'items' varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
'name' varchar(100) COLLATE utf8_unicode_ci NOT NULL,
'first_name' varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
'last_name' varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
'ci' varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
'gender' enum('f','m','o') COLLATE utf8_unicode_ci NOT NULL,
'title' varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
'birthday' date DEFAULT NULL,
'street_live' varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
'birthplace' varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
'cel_phone' varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
'home_phone' varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
'office_phone' varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
'email' varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
'cardex_number' varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
'photo' varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'user.png',
'position' varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
'active' tinyint(1) NOT NULL,
'unidad_id' int(10) UNSIGNED NOT NULL,
'created_at' timestamp NULL DEFAULT NULL,
'updated_at' timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE 'employers'
ADD PRIMARY KEY ('id'),
ADD KEY 'employers_unidad_id_foreign' ('unidad_id');
What I need
Place 1 employee ids start from 1
Place 2 employee ids start from 5000
Place 3 the ids of employee start from 10000
Place 4 employee ids start from 15000
I hope it has been understood, and if someone had another solution more practical I would appreciate it.