<commit_before>SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

-- ============================================================================
-- Constants section
-- ============================================================================

-- Default start page id (aka document meta id)
SET @start_document__meta_id = 1001;

-- Predefined system's users identities
SET @user_id__admin = 1;
SET @user_id__user = 2;

-- Prederined system's roles identities
SET @role_id__superadmin = 0;
SET @role_id__useradmin = 1;
SET @role_id__users = 2;

-- ============================================================================
-- Variables section
-- ============================================================================

-- User interface language, should be assigned outside
-- In v.4.x it is assigned at the build time by filtering @language@ string in init.sql file.
-- Possible values: 'eng', 'swe'
SET @ui__language = 'eng';

-- Database schema version
SET @database_version__major = 6;
SET @database_version__minor = 1;

-- Predefined i18n languages indentities
SET @language_id__english = 1;
SET @language_id__swedish = 2;
SET @language_id__default = @language_id__english;

-- Initial values for start page in English
SET @start_document__headline__english = 'Start page';
SET @start_document__text1__english = 'Welcome to imCMS';
SET @start_document__text2__english = '<p><a href="<?imcms:contextpath?>/login/" title="Link to login-page"><b>Log in!</b></a></p>
  <p><a href="<?imcms:contextpath?>/servlet/SearchDocuments" target="_blank" title="Link to search-page"><b>Search-page</b></a><br/>
  Opens in new window.</p>
  <p><a href="@documentationwebappurl@/" target="_blank" title="Link to documentation-site"><b>Documentation</b></a><br/>
  External site, opens in new window.</p>
  <p><a href="http://www.imcms.net" target="_blank" title="Link to www.imcms.net"><b>More about imCMS</b></a><br/>
  imCMS Product-site. External site, opens in new window.</p>
  <p><a href="<?imcms:contextpath?>/imcms/docs/" target="_blank" title="Link to included documentation."><b>Included documentation.</b></a><br/>
  For administrators and developers, in english. Opens in new window.</p>
  <p><a href="<?imcms:contextpath?>/imcms/docs/apisamples/" target="_blank" title="Link to API-samples"><b>API examples</b></a><br/>
  Only for developers, in english. Opens in new window.<br/>
  Note! Only to be used in test environment - not sites for public use.</p>';

-- Initial values for start page in Swedish
SET @start_document__headline__swedish = 'Startsidan';
SET @start_document__text1__swedish = 'Välkommen till imCMS';
SET @start_document__text2__swedish = '<p><a href="<?imcms:contextpath?>/login/" title="Länk till inloggningssida"><b>Logga in!</b></a></p>
  <p><a href="<?imcms:contextpath?>/servlet/SearchDocuments" target="_blank" title="Länk till söksida"><b>Söksida</b></a><br/>
  Öppnas i nytt fönster.</p>
  <p><a href="@documentationwebappurl@/" target="_blank" title="Länk till dokumentationssajt"><b>Dokumentation</b></a><br/>
  Extern sajt, öppnas i nytt fönster.</p>
  <p><a href="http://www.imcms.net" target="_blank" title="Länk till www.imcms.net"><b>Mer om imCMS</b></a><br/>
  Produktsajt om imCMS. Extern sajt, öppnas i nytt fönster.</p>
  <p><a href="<?imcms:contextpath?>/imcms/docs/" target="_blank" title="Länk till medföljande dokumentation."><b>Medföljande dokumentation</b></a><br/>
  För administratörer och utvecklare, på engelska. Öppnas i nytt fönster.</p>
  <p><a href="<?imcms:contextpath?>/imcms/docs/apisamples/" target="_blank" title="Länk till API-exempel"><b>API-exempel</b></a><br/>
  Endast för utvecklare, på engelska. Öppnas i nytt fönster.<br/>
  OBS! Endast för testmiljö - använd inte på publika sajter.</p>';


-- ============================================================================
-- Data section
-- ============================================================================

--
-- Data for table users
--

INSERT INTO users
  (user_id, login_name, login_password, first_name, last_name, title, company, address, city, zip, country, county_council, email, external, active, create_date, language, session_id)
VALUES
  (@user_id__admin, 'admin', 'admin', 'Admin', 'Super', '', '', '', '', '', '', '', '', 0, 1, NOW(), @'ui__language', NULL),
  (@user_id__user, 'user', 'user', 'User', 'Extern', '', '', '', '', '', '', '', '', 0, 1, NOW(), @'ui__language', NULL);

--
-- Data for table meta
--

INSERT INTO meta
  (meta_id, doc_type, owner_id, permissions, shared, show_meta, lang_prefix, date_created, date_modified, disable_search, target, activate, archived_datetime, publisher_id, status, publication_start_datetime, publication_end_datetime, missing_i18n_show_rule)
VALUES
  (@start_document__meta_id, 2, @user_id__admin, 0, 0, 0, @'ui__language', NOW(), NOW(), 0, '_self', 1, NULL, NULL, 2, NOW(), NULL, 'DO_NOT_SHOW'),
  (@start_document__meta_id+1, 2, @user_id__admin, 0, 0, 0, @'ui__language', NOW(), NOW(), 0, '_self', 1, NULL, NULL, 2, NOW(), NULL, 'DO_NOT_SHOW'),
  (@start_document__meta_id+2, 2, @user_id__admin, 0, 0, 0, @'ui__language', NOW(), NOW(), 0, '_self', 1, NULL, NULL, 2, NOW(), NULL, 'DO_NOT_SHOW');

--
-- Create demo document versions
--
<commit_msg>IMCMS-255 - Upgrade server side to work with new client: - Fixed old sql diff.<commit_after>SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

-- ============================================================================
-- Constants section
-- ============================================================================

-- Default start page id (aka document meta id)
SET @start_document__meta_id = 1001;

-- Predefined system's users identities
SET @user_id__admin = 1;
SET @user_id__user = 2;

-- Prederined system's roles identities
SET @role_id__superadmin = 0;
SET @role_id__useradmin = 1;
SET @role_id__users = 2;

-- ============================================================================
-- Variables section
-- ============================================================================

-- User interface language, should be assigned outside
-- In v.4.x it is assigned at the build time by filtering @language@ string in init.sql file.
-- Possible values: 'eng', 'swe'
SET @ui__language = 'eng';

-- Database schema version
SET @database_version__major = 6;
SET @database_version__minor = 1;

-- Predefined i18n languages indentities
SET @language_id__english = 1;
SET @language_id__swedish = 2;
SET @language_id__default = @language_id__english;

-- Initial values for start page in English
SET @start_document__headline__english = 'Start page';
SET @start_document__text1__english = 'Welcome to imCMS';
SET @start_document__text2__english = '<p><a href="<?imcms:contextpath?>/login/" title="Link to login-page"><b>Log in!</b></a></p>
  <p><a href="<?imcms:contextpath?>/servlet/SearchDocuments" target="_blank" title="Link to search-page"><b>Search-page</b></a><br/>
  Opens in new window.</p>
  <p><a href="@documentationwebappurl@/" target="_blank" title="Link to documentation-site"><b>Documentation</b></a><br/>
  External site, opens in new window.</p>
  <p><a href="http://www.imcms.net" target="_blank" title="Link to www.imcms.net"><b>More about imCMS</b></a><br/>
  imCMS Product-site. External site, opens in new window.</p>
  <p><a href="<?imcms:contextpath?>/imcms/docs/" target="_blank" title="Link to included documentation."><b>Included documentation.</b></a><br/>
  For administrators and developers, in english. Opens in new window.</p>
  <p><a href="<?imcms:contextpath?>/imcms/docs/apisamples/" target="_blank" title="Link to API-samples"><b>API examples</b></a><br/>
  Only for developers, in english. Opens in new window.<br/>
  Note! Only to be used in test environment - not sites for public use.</p>';

-- Initial values for start page in Swedish
SET @start_document__headline__swedish = 'Startsidan';
SET @start_document__text1__swedish = 'Välkommen till imCMS';
SET @start_document__text2__swedish = '<p><a href="<?imcms:contextpath?>/login/" title="Länk till inloggningssida"><b>Logga in!</b></a></p>
  <p><a href="<?imcms:contextpath?>/servlet/SearchDocuments" target="_blank" title="Länk till söksida"><b>Söksida</b></a><br/>
  Öppnas i nytt fönster.</p>
  <p><a href="@documentationwebappurl@/" target="_blank" title="Länk till dokumentationssajt"><b>Dokumentation</b></a><br/>
  Extern sajt, öppnas i nytt fönster.</p>
  <p><a href="http://www.imcms.net" target="_blank" title="Länk till www.imcms.net"><b>Mer om imCMS</b></a><br/>
  Produktsajt om imCMS. Extern sajt, öppnas i nytt fönster.</p>
  <p><a href="<?imcms:contextpath?>/imcms/docs/" target="_blank" title="Länk till medföljande dokumentation."><b>Medföljande dokumentation</b></a><br/>
  För administratörer och utvecklare, på engelska. Öppnas i nytt fönster.</p>
  <p><a href="<?imcms:contextpath?>/imcms/docs/apisamples/" target="_blank" title="Länk till API-exempel"><b>API-exempel</b></a><br/>
  Endast för utvecklare, på engelska. Öppnas i nytt fönster.<br/>
  OBS! Endast för testmiljö - använd inte på publika sajter.</p>';


-- ============================================================================
-- Data section
-- ============================================================================

--
-- Data for table users
--

INSERT INTO users
  (user_id, login_name, login_password, first_name, last_name, title, company, address, city, zip, country, county_council, email, external, active, create_date, language, session_id)
VALUES
  (@user_id__admin, 'admin', 'admin', 'Admin', 'Super', '', '', '', '', '', '', '', '<EMAIL>', 0, 1, NOW(), @'ui__language', NULL),
  (@user_id__user, 'user', 'user', 'User', 'Extern', '', '', '', '', '', '', '', '', 0, 1, NOW(), @'ui__language', NULL);

--
-- Data for table meta
--

INSERT INTO meta
  (meta_id, doc_type, owner_id, permissions, shared, show_meta, lang_prefix, date_created, date_modified, disable_search, target, activate, archived_datetime, publisher_id, status, publication_start_datetime, publication_end_datetime, missing_i18n_show_rule)
VALUES
  (@start_document__meta_id, 2, @user_id__admin, 0, 0, 0, @'ui__language', NOW(), NOW(), 0, '_self', 1, NULL, NULL, 2, NOW(), NULL, 'DO_NOT_SHOW'),
  (@start_document__meta_id+1, 2, @user_id__admin, 0, 0, 0, @'ui__language', NOW(), NOW(), 0, '_self', 1, NULL, NULL, 2, NOW(), NULL, 'DO_NOT_SHOW'),
  (@start_document__meta_id+2, 2, @user_id__admin, 0, 0, 0, @'ui__language', NOW(), NOW(), 0, '_self', 1, NULL, NULL, 2, NOW(), NULL, 'DO_NOT_SHOW');

--
-- Create demo document versions
--

{'fraction_non_alphanumeric': 0.24573540561031085, 'fraction_numerical': 0.009571645185746777, 'mean_word_length': 5.865972674040338, 'pattern_counts': {'":': 0, '<': 188, '<?xml version=': 0, '>': 188, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4614636', 'n_tokens_mistral': 3619, 'n_tokens_neox': 3395, 'n_words': 889}