sql stringlengths 6 1.05M |
|---|
<gh_stars>0
CREATE TEMPORARY TABLE temp_tbl_winqry
AS
SELECT row_number() over ( partition by col_chr ) row_num , col_chr
FROM typeall_l;
SELECT * FROM temp_tbl_winqry;
DROP TABLE temp_tbl_winqry;
|
<reponame>paolomococci/enterprise-workshop
CREATE TABLE food_cart_db.password_resets (
email varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
token varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
created_at timestamp NULL DEFAULT NULL,
KEY `password_resets_email_index` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
<filename>Chatbot_Data/DATA/mysql/django_content_type.sql
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50717
Source Host : localhost:3306
Source Database : chatbot_cn
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2019-05-31 23:22:36
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for django_content_type
-- ----------------------------
DROP TABLE IF EXISTS `django_content_type`;
CREATE TABLE `django_content_type` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_label` varchar(100) NOT NULL,
`model` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of django_content_type
-- ----------------------------
INSERT INTO `django_content_type` VALUES ('1', 'admin', 'logentry');
INSERT INTO `django_content_type` VALUES ('3', 'auth', 'group');
INSERT INTO `django_content_type` VALUES ('2', 'auth', 'permission');
INSERT INTO `django_content_type` VALUES ('4', 'auth', 'user');
INSERT INTO `django_content_type` VALUES ('5', 'contenttypes', 'contenttype');
INSERT INTO `django_content_type` VALUES ('6', 'sessions', 'session');
|
insert into bldemo values(1, 'c1', 28, 109.325, 'beijing', true);
insert into bldemo values(2, 'c2', 17, 139.2, 'beijing', false);
insert into bldemo values(3, 'c3', 22, 34.89, 'shanghai', 0);
insert into bldemo values(4, 'c4', 33, 3392.88, 'zhengzhou', 122);
insert into bldemo values(5, 'c5', 39, 342.01, 'beijing', 2147483648);
insert into bldemo values(6, 'c6', 11, 3.6, 'zhengzhou', 4294967295);
insert into bldemo values(7, 'c7', 19, 223.18, 'shanghai', 4294967296);
|
insert into Done (task_id)
values ($1) |
<gh_stars>10-100
#tags: kwc
DELETE FROM `cache_component_includes` WHERE `type` = 'partial'
|
DO $$
DECLARE r record;
BEGIN
FOR r IN SELECT table_schema, table_name FROM information_schema.tables
WHERE table_type = 'BASE TABLE' AND table_schema = 'public' AND table_name = 'coffee_logs'
LOOP
EXECUTE 'TRUNCATE TABLE ' || quote_ident(r.table_schema) || '.' || quote_ident(r.table_name);
END LOOP;
END
$$;
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: jani
* Created: 18/06/2018
*/
/******************************rol_menu******************************/
Create Table rol_menu(rolme_Id Tid Constraint rolme_Id_NN Not Null
Constraint rolme_key Primary Key,
rol_id tId
Constraint rolme_lnk_rol_id
References roles(rol_id)
on Delete Cascade
on Update Cascade,
rolme_label tsNombreLP
Constraint rolme_label_NN Not Null,
rolme_url tsNombreLP
Constraint rolme_url_NN Not Null);
Create Generator rolme_Id_Gen;
Commit work;
Set term ^;
Create trigger
Alta_rolme For rol_menu
Active Before Insert
as
Begin
If (New.rolme_Id Is null) Then
New.rolme_Id = Gen_id(rolme_Id_Gen,1);
End ;
^
Commit work^
Create Procedure rolme_Key_Gen
Returns( Avalue Integer)
As
Begin
aValue = Gen_id(rolme_Id_Gen,1);
End
^
set term ; ^
Grant all on rol_menu To Public;
Grant Execute on Procedure rolme_Key_Gen To Public;
|
CREATE TABLE MetaData
(
name text,
value text
)
|
INSERT INTO "users" (
"username",
"password"
) VALUES (
'admin',
'<PASSWORD>'
), (
'User 1',
'<PASSWORD>'
), (
'User 2',
'<PASSWORD>'
), (
'User 3',
'<PASSWORD>'
) ON CONFLICT DO NOTHING;
|
SELECT uuid_in(md5(random()::text || clock_timestamp()::text)::cstring);
|
<reponame>NeiChan/activitylog
CREATE DATABASE IF NOT EXISTS `activitylog_school`;
|
create user 'houseinspection'@'%' identified by '<KEY>';
grant all privileges on houseinspection.* to 'house-inspection'@'%' identified by '<KEY>';
flush privileges;
|
<filename>sql/new 3.sql
CREATE OR REPLACE procedure ALL_product
(
ALL_PRODUCT_record OUT SYS_REFCURSOR
)
AS
BEGIN
OPEN ALL_PRODUCT_record FOR
SELECT p.id,p.name,p.price, c.name, p.category_name, p.product_status, sp.name
FROM product p
INNER JOIN customer c on p.customer_id = c.id
INNER JOIN shipment s on p.shipment_id = s.id
INNER JOIN shipment_company sp on sp.id = s.shipment_company_id;
END;
/
var ALL_P refcursor;
exec ALL_product(:ALL_P);
print ALL_P; |
<reponame>jenielmangahis/bizboxinventory
/*
Navicat MySQL Data Transfer
Source Server : localWeb
Source Server Version : 50505
Source Host : localhost:3306
Source Database : coreinvdb_1
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2020-11-05 15:47:58
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `groups`
-- ----------------------------
DROP TABLE IF EXISTS `groups`;
CREATE TABLE `groups` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of groups
-- ----------------------------
INSERT INTO `groups` VALUES ('1', 'Super Admin', '2019-05-17 18:31:13', '2019-05-29 22:02:01', null);
INSERT INTO `groups` VALUES ('2', 'Company User (MCA)', '2019-05-29 20:25:12', '2019-12-11 04:37:05', null);
INSERT INTO `groups` VALUES ('3', 'Customer', '2019-05-29 22:02:11', '2019-05-29 22:02:11', null);
INSERT INTO `groups` VALUES ('4', 'RTR Recovery Group', '2019-11-30 08:06:18', '2019-11-30 08:06:18', null);
-- ----------------------------
-- Table structure for `items`
-- ----------------------------
DROP TABLE IF EXISTS `items`;
CREATE TABLE `items` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`item_category_id` int(11) NOT NULL,
`item_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`item_description` text COLLATE utf8mb4_unicode_ci NOT NULL,
`stock` double(11,2) DEFAULT NULL,
`price` double(11,2) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of items
-- ----------------------------
-- ----------------------------
-- Table structure for `item_categories`
-- ----------------------------
DROP TABLE IF EXISTS `item_categories`;
CREATE TABLE `item_categories` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`item_category_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of item_categories
-- ----------------------------
INSERT INTO `item_categories` VALUES ('1', 'CATEGORY B', '2020-11-05 02:09:50', '2020-11-05 02:13:46', null);
INSERT INTO `item_categories` VALUES ('3', 'CATEGORY A', '2020-11-05 02:32:37', '2020-11-05 02:32:37', null);
-- ----------------------------
-- Table structure for `migrations`
-- ----------------------------
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE `migrations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of migrations
-- ----------------------------
INSERT INTO `migrations` VALUES ('1', '2020_11_05_013809_create_items_table', '1');
INSERT INTO `migrations` VALUES ('2', '2020_11_05_014241_create_item_category_table', '1');
-- ----------------------------
-- Table structure for `password_resets`
-- ----------------------------
DROP TABLE IF EXISTS `password_resets`;
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
KEY `password_resets_email_index` (`email`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of password_resets
-- ----------------------------
-- ----------------------------
-- Table structure for `users`
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`group_id` int(11) NOT NULL,
`nickname` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`firstname` varchar(90) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`lastname` varchar(90) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`mobile_number` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`work_number` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`home_number` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`username` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`status` varchar(35) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`profile_img` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_active` smallint(6) NOT NULL COMMENT '0=active,1=suspended',
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`last_login` datetime DEFAULT NULL,
`reset_code` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of users
-- ----------------------------
INSERT INTO `users` VALUES ('1', '1', 'Admin', 'Admin', 'Core', '09279983995', null, null, 'admin', '<EMAIL>', null, '$2y$10$t780SAl1b2k0yXzhh5eCtuwOjgzBEukfDScQrs6CW/FUzJHhAF2qK', null, '1d8bd9134663fad36847c53a65f6c98f.jpg', '0', null, '2019-05-11 19:03:15', '2020-11-05 01:28:48', null, '2020-11-05 01:28:48', null);
-- ----------------------------
-- Table structure for `user_logs`
-- ----------------------------
DROP TABLE IF EXISTS `user_logs`;
CREATE TABLE `user_logs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`login_date` datetime NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=711 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of user_logs
-- ----------------------------
INSERT INTO `user_logs` VALUES ('4', '1', '2020-04-02 02:30:06', '2020-04-02 16:30:06', null, null);
INSERT INTO `user_logs` VALUES ('5', '1', '2020-04-02 05:44:26', '2020-04-02 19:44:26', null, null);
INSERT INTO `user_logs` VALUES ('6', '3', '2020-04-02 09:59:48', '2020-04-02 23:59:48', null, null);
INSERT INTO `user_logs` VALUES ('7', '4', '2020-04-02 11:21:28', '2020-04-03 01:21:28', null, null);
INSERT INTO `user_logs` VALUES ('8', '10', '2020-04-02 12:55:05', '2020-04-03 02:55:05', null, null);
INSERT INTO `user_logs` VALUES ('9', '3', '2020-04-02 14:04:03', '2020-04-03 04:04:03', null, null);
INSERT INTO `user_logs` VALUES ('10', '9', '2020-04-02 16:32:13', '2020-04-03 06:32:13', null, null);
INSERT INTO `user_logs` VALUES ('11', '3', '2020-04-02 16:40:10', '2020-04-03 06:40:10', null, null);
INSERT INTO `user_logs` VALUES ('12', '1', '2020-04-03 00:02:05', '2020-04-03 14:02:05', null, null);
INSERT INTO `user_logs` VALUES ('13', '1', '2020-04-03 07:48:14', '2020-04-03 21:48:14', null, null);
INSERT INTO `user_logs` VALUES ('14', '3', '2020-04-03 10:06:59', '2020-04-04 00:06:59', null, null);
INSERT INTO `user_logs` VALUES ('15', '10', '2020-04-03 11:57:33', '2020-04-04 01:57:33', null, null);
INSERT INTO `user_logs` VALUES ('16', '24', '2020-04-03 13:31:45', '2020-04-04 03:31:45', null, null);
INSERT INTO `user_logs` VALUES ('17', '4', '2020-04-03 13:54:46', '2020-04-04 03:54:46', null, null);
INSERT INTO `user_logs` VALUES ('18', '8', '2020-04-03 14:09:14', '2020-04-04 04:09:14', null, null);
INSERT INTO `user_logs` VALUES ('19', '10', '2020-04-03 16:15:28', '2020-04-04 06:15:28', null, null);
INSERT INTO `user_logs` VALUES ('20', '1', '2020-04-05 22:39:46', '2020-04-06 12:39:46', null, null);
INSERT INTO `user_logs` VALUES ('21', '1', '2020-04-06 08:10:35', '2020-04-06 22:10:35', null, null);
INSERT INTO `user_logs` VALUES ('22', '3', '2020-04-06 10:27:03', '2020-04-07 00:27:03', null, null);
INSERT INTO `user_logs` VALUES ('23', '10', '2020-04-06 10:58:27', '2020-04-07 00:58:27', null, null);
INSERT INTO `user_logs` VALUES ('24', '4', '2020-04-06 12:31:11', '2020-04-07 02:31:11', null, null);
INSERT INTO `user_logs` VALUES ('25', '3', '2020-04-06 15:25:40', '2020-04-07 05:25:40', null, null);
INSERT INTO `user_logs` VALUES ('26', '3', '2020-04-06 16:59:16', '2020-04-07 06:59:16', null, null);
INSERT INTO `user_logs` VALUES ('27', '1', '2020-04-07 10:27:46', '2020-04-08 00:27:46', null, null);
INSERT INTO `user_logs` VALUES ('28', '3', '2020-04-07 10:46:38', '2020-04-08 00:46:38', null, null);
INSERT INTO `user_logs` VALUES ('29', '3', '2020-04-07 10:50:56', '2020-04-08 00:50:56', null, null);
INSERT INTO `user_logs` VALUES ('30', '10', '2020-04-07 11:26:08', '2020-04-08 01:26:08', null, null);
INSERT INTO `user_logs` VALUES ('31', '10', '2020-04-07 13:59:01', '2020-04-08 03:59:01', null, null);
INSERT INTO `user_logs` VALUES ('32', '3', '2020-04-07 14:23:13', '2020-04-08 04:23:13', null, null);
INSERT INTO `user_logs` VALUES ('33', '10', '2020-04-07 16:28:45', '2020-04-08 06:28:45', null, null);
INSERT INTO `user_logs` VALUES ('34', '3', '2020-04-08 10:36:17', '2020-04-09 00:36:17', null, null);
INSERT INTO `user_logs` VALUES ('35', '8', '2020-04-08 11:58:52', '2020-04-09 01:58:52', null, null);
INSERT INTO `user_logs` VALUES ('36', '4', '2020-04-08 12:50:39', '2020-04-09 02:50:39', null, null);
INSERT INTO `user_logs` VALUES ('37', '10', '2020-04-08 17:13:43', '2020-04-09 07:13:43', null, null);
INSERT INTO `user_logs` VALUES ('38', '3', '2020-04-09 10:23:35', '2020-04-10 00:23:35', null, null);
INSERT INTO `user_logs` VALUES ('39', '10', '2020-04-09 11:58:00', '2020-04-10 01:58:00', null, null);
INSERT INTO `user_logs` VALUES ('40', '4', '2020-04-09 12:03:59', '2020-04-10 02:03:59', null, null);
INSERT INTO `user_logs` VALUES ('41', '24', '2020-04-09 14:28:43', '2020-04-10 04:28:43', null, null);
INSERT INTO `user_logs` VALUES ('42', '9', '2020-04-09 14:31:59', '2020-04-10 04:31:59', null, null);
INSERT INTO `user_logs` VALUES ('43', '9', '2020-04-09 14:36:48', '2020-04-10 04:36:48', null, null);
INSERT INTO `user_logs` VALUES ('44', '3', '2020-04-09 15:01:30', '2020-04-10 05:01:30', null, null);
INSERT INTO `user_logs` VALUES ('45', '4', '2020-04-09 17:10:20', '2020-04-10 07:10:20', null, null);
INSERT INTO `user_logs` VALUES ('46', '1', '2020-04-10 02:00:15', '2020-04-10 16:00:15', null, null);
INSERT INTO `user_logs` VALUES ('47', '3', '2020-04-10 10:04:23', '2020-04-11 00:04:23', null, null);
INSERT INTO `user_logs` VALUES ('48', '5', '2020-04-10 10:27:12', '2020-04-11 00:27:12', null, null);
INSERT INTO `user_logs` VALUES ('49', '10', '2020-04-10 13:41:41', '2020-04-11 03:41:41', null, null);
INSERT INTO `user_logs` VALUES ('50', '10', '2020-04-10 16:24:54', '2020-04-11 06:24:54', null, null);
INSERT INTO `user_logs` VALUES ('51', '17', '2020-04-10 16:43:27', '2020-04-11 06:43:27', null, null);
INSERT INTO `user_logs` VALUES ('52', '4', '2020-04-13 10:30:19', '2020-04-14 00:30:19', null, null);
INSERT INTO `user_logs` VALUES ('53', '8', '2020-04-13 11:53:33', '2020-04-14 01:53:33', null, null);
INSERT INTO `user_logs` VALUES ('54', '9', '2020-04-13 16:47:28', '2020-04-14 06:47:28', null, null);
INSERT INTO `user_logs` VALUES ('55', '3', '2020-04-13 17:10:30', '2020-04-14 07:10:30', null, null);
INSERT INTO `user_logs` VALUES ('56', '3', '2020-04-14 09:49:45', '2020-04-14 23:49:45', null, null);
INSERT INTO `user_logs` VALUES ('57', '9', '2020-04-14 13:15:30', '2020-04-15 03:15:30', null, null);
INSERT INTO `user_logs` VALUES ('58', '4', '2020-04-14 13:22:58', '2020-04-15 03:22:58', null, null);
INSERT INTO `user_logs` VALUES ('59', '3', '2020-04-14 13:46:01', '2020-04-15 03:46:01', null, null);
INSERT INTO `user_logs` VALUES ('60', '9', '2020-04-14 16:08:15', '2020-04-15 06:08:15', null, null);
INSERT INTO `user_logs` VALUES ('61', '3', '2020-04-14 16:08:36', '2020-04-15 06:08:36', null, null);
INSERT INTO `user_logs` VALUES ('62', '4', '2020-04-14 17:33:31', '2020-04-15 07:33:31', null, null);
INSERT INTO `user_logs` VALUES ('63', '1', '2020-04-15 05:08:46', '2020-04-15 19:08:46', null, null);
INSERT INTO `user_logs` VALUES ('64', '3', '2020-04-15 10:05:50', '2020-04-16 00:05:50', null, null);
INSERT INTO `user_logs` VALUES ('65', '3', '2020-04-16 10:12:23', '2020-04-17 00:12:23', null, null);
INSERT INTO `user_logs` VALUES ('66', '4', '2020-04-16 13:07:28', '2020-04-17 03:07:28', null, null);
INSERT INTO `user_logs` VALUES ('67', '10', '2020-04-16 14:18:39', '2020-04-17 04:18:39', null, null);
INSERT INTO `user_logs` VALUES ('68', '3', '2020-04-16 15:38:55', '2020-04-17 05:38:55', null, null);
INSERT INTO `user_logs` VALUES ('69', '3', '2020-04-17 10:19:49', '2020-04-18 00:19:49', null, null);
INSERT INTO `user_logs` VALUES ('70', '5', '2020-04-17 10:24:41', '2020-04-18 00:24:41', null, null);
INSERT INTO `user_logs` VALUES ('71', '3', '2020-04-17 10:39:54', '2020-04-18 00:39:54', null, null);
INSERT INTO `user_logs` VALUES ('72', '4', '2020-04-17 13:03:16', '2020-04-18 03:03:16', null, null);
INSERT INTO `user_logs` VALUES ('73', '3', '2020-04-17 15:40:54', '2020-04-18 05:40:54', null, null);
INSERT INTO `user_logs` VALUES ('74', '10', '2020-04-17 16:31:12', '2020-04-18 06:31:12', null, null);
INSERT INTO `user_logs` VALUES ('75', '3', '2020-04-20 10:17:37', '2020-04-21 00:17:37', null, null);
INSERT INTO `user_logs` VALUES ('76', '4', '2020-04-20 11:50:55', '2020-04-21 01:50:55', null, null);
INSERT INTO `user_logs` VALUES ('77', '3', '2020-04-20 13:09:51', '2020-04-21 03:09:51', null, null);
INSERT INTO `user_logs` VALUES ('78', '10', '2020-04-20 15:08:32', '2020-04-21 05:08:32', null, null);
INSERT INTO `user_logs` VALUES ('79', '4', '2020-04-20 15:12:46', '2020-04-21 05:12:46', null, null);
INSERT INTO `user_logs` VALUES ('80', '17', '2020-04-20 15:27:50', '2020-04-21 05:27:50', null, null);
INSERT INTO `user_logs` VALUES ('81', '3', '2020-04-20 16:28:20', '2020-04-21 06:28:20', null, null);
INSERT INTO `user_logs` VALUES ('82', '24', '2020-04-20 22:54:42', '2020-04-21 12:54:42', null, null);
INSERT INTO `user_logs` VALUES ('83', '3', '2020-04-21 10:07:18', '2020-04-22 00:07:18', null, null);
INSERT INTO `user_logs` VALUES ('84', '3', '2020-04-21 10:28:35', '2020-04-22 00:28:35', null, null);
INSERT INTO `user_logs` VALUES ('85', '10', '2020-04-21 13:07:19', '2020-04-22 03:07:19', null, null);
INSERT INTO `user_logs` VALUES ('86', '4', '2020-04-21 13:10:50', '2020-04-22 03:10:50', null, null);
INSERT INTO `user_logs` VALUES ('87', '10', '2020-04-21 15:57:55', '2020-04-22 05:57:55', null, null);
INSERT INTO `user_logs` VALUES ('88', '3', '2020-04-22 11:15:52', '2020-04-23 01:15:52', null, null);
INSERT INTO `user_logs` VALUES ('89', '8', '2020-04-22 11:35:59', '2020-04-23 01:35:59', null, null);
INSERT INTO `user_logs` VALUES ('90', '3', '2020-04-22 11:56:23', '2020-04-23 01:56:23', null, null);
INSERT INTO `user_logs` VALUES ('91', '10', '2020-04-22 14:52:42', '2020-04-23 04:52:42', null, null);
INSERT INTO `user_logs` VALUES ('92', '8', '2020-04-22 16:54:28', '2020-04-23 06:54:28', null, null);
INSERT INTO `user_logs` VALUES ('93', '3', '2020-04-23 10:57:09', '2020-04-24 00:57:09', null, null);
INSERT INTO `user_logs` VALUES ('94', '3', '2020-04-23 12:21:49', '2020-04-24 02:21:49', null, null);
INSERT INTO `user_logs` VALUES ('95', '3', '2020-04-23 17:20:42', '2020-04-24 07:20:42', null, null);
INSERT INTO `user_logs` VALUES ('96', '3', '2020-04-24 10:20:21', '2020-04-25 00:20:21', null, null);
INSERT INTO `user_logs` VALUES ('97', '5', '2020-04-24 10:25:55', '2020-04-25 00:25:55', null, null);
INSERT INTO `user_logs` VALUES ('98', '17', '2020-04-24 13:07:30', '2020-04-25 03:07:30', null, null);
INSERT INTO `user_logs` VALUES ('99', '3', '2020-04-27 10:53:03', '2020-04-28 00:53:03', null, null);
INSERT INTO `user_logs` VALUES ('100', '4', '2020-04-27 10:57:54', '2020-04-28 00:57:54', null, null);
INSERT INTO `user_logs` VALUES ('101', '3', '2020-04-27 11:35:05', '2020-04-28 01:35:05', null, null);
INSERT INTO `user_logs` VALUES ('102', '5', '2020-04-27 12:21:52', '2020-04-28 02:21:52', null, null);
INSERT INTO `user_logs` VALUES ('103', '10', '2020-04-27 13:02:00', '2020-04-28 03:02:00', null, null);
INSERT INTO `user_logs` VALUES ('104', '17', '2020-04-27 14:21:15', '2020-04-28 04:21:15', null, null);
INSERT INTO `user_logs` VALUES ('105', '10', '2020-04-27 17:47:27', '2020-04-28 07:47:27', null, null);
INSERT INTO `user_logs` VALUES ('106', '1', '2020-04-27 23:47:27', '2020-04-28 13:47:27', null, null);
INSERT INTO `user_logs` VALUES ('107', '3', '2020-04-28 09:55:11', '2020-04-28 23:55:11', null, null);
INSERT INTO `user_logs` VALUES ('108', '4', '2020-04-28 11:03:56', '2020-04-29 01:03:56', null, null);
INSERT INTO `user_logs` VALUES ('109', '3', '2020-04-28 11:13:06', '2020-04-29 01:13:06', null, null);
INSERT INTO `user_logs` VALUES ('110', '17', '2020-04-28 12:26:48', '2020-04-29 02:26:48', null, null);
INSERT INTO `user_logs` VALUES ('111', '17', '2020-04-28 12:31:33', '2020-04-29 02:31:33', null, null);
INSERT INTO `user_logs` VALUES ('112', '24', '2020-04-28 13:29:30', '2020-04-29 03:29:30', null, null);
INSERT INTO `user_logs` VALUES ('113', '17', '2020-04-28 15:05:58', '2020-04-29 05:05:58', null, null);
INSERT INTO `user_logs` VALUES ('114', '17', '2020-04-28 15:24:14', '2020-04-29 05:24:14', null, null);
INSERT INTO `user_logs` VALUES ('115', '17', '2020-04-28 15:43:30', '2020-04-29 05:43:30', null, null);
INSERT INTO `user_logs` VALUES ('116', '17', '2020-04-28 16:20:28', '2020-04-29 06:20:28', null, null);
INSERT INTO `user_logs` VALUES ('117', '3', '2020-04-28 17:14:28', '2020-04-29 07:14:28', null, null);
INSERT INTO `user_logs` VALUES ('118', '17', '2020-04-29 10:12:40', '2020-04-30 00:12:40', null, null);
INSERT INTO `user_logs` VALUES ('119', '17', '2020-04-29 11:10:01', '2020-04-30 01:10:01', null, null);
INSERT INTO `user_logs` VALUES ('120', '3', '2020-04-29 11:19:31', '2020-04-30 01:19:31', null, null);
INSERT INTO `user_logs` VALUES ('121', '3', '2020-04-29 11:33:01', '2020-04-30 01:33:01', null, null);
INSERT INTO `user_logs` VALUES ('122', '4', '2020-04-29 13:45:52', '2020-04-30 03:45:52', null, null);
INSERT INTO `user_logs` VALUES ('123', '17', '2020-04-29 13:46:35', '2020-04-30 03:46:35', null, null);
INSERT INTO `user_logs` VALUES ('124', '17', '2020-04-29 15:22:31', '2020-04-30 05:22:31', null, null);
INSERT INTO `user_logs` VALUES ('125', '17', '2020-04-29 15:42:48', '2020-04-30 05:42:48', null, null);
INSERT INTO `user_logs` VALUES ('126', '3', '2020-04-29 16:26:11', '2020-04-30 06:26:11', null, null);
INSERT INTO `user_logs` VALUES ('127', '3', '2020-04-30 10:02:54', '2020-05-01 00:02:54', null, null);
INSERT INTO `user_logs` VALUES ('128', '17', '2020-04-30 11:10:50', '2020-05-01 01:10:50', null, null);
INSERT INTO `user_logs` VALUES ('129', '17', '2020-04-30 11:39:32', '2020-05-01 01:39:32', null, null);
INSERT INTO `user_logs` VALUES ('130', '3', '2020-04-30 17:28:52', '2020-05-01 07:28:52', null, null);
INSERT INTO `user_logs` VALUES ('131', '3', '2020-04-30 17:41:20', '2020-05-01 07:41:20', null, null);
INSERT INTO `user_logs` VALUES ('132', '1', '2020-05-01 00:25:54', '2020-05-01 14:25:54', null, null);
INSERT INTO `user_logs` VALUES ('133', '3', '2020-05-01 10:30:41', '2020-05-02 00:30:41', null, null);
INSERT INTO `user_logs` VALUES ('134', '5', '2020-05-01 10:31:45', '2020-05-02 00:31:45', null, null);
INSERT INTO `user_logs` VALUES ('135', '17', '2020-05-01 12:15:22', '2020-05-02 02:15:22', null, null);
INSERT INTO `user_logs` VALUES ('136', '5', '2020-05-01 13:37:53', '2020-05-02 03:37:53', null, null);
INSERT INTO `user_logs` VALUES ('137', '3', '2020-05-01 15:50:40', '2020-05-02 05:50:40', null, null);
INSERT INTO `user_logs` VALUES ('138', '17', '2020-05-01 16:57:18', '2020-05-02 06:57:18', null, null);
INSERT INTO `user_logs` VALUES ('139', '3', '2020-05-04 11:12:49', '2020-05-05 01:12:49', null, null);
INSERT INTO `user_logs` VALUES ('140', '10', '2020-05-04 12:51:28', '2020-05-05 02:51:28', null, null);
INSERT INTO `user_logs` VALUES ('141', '4', '2020-05-04 12:53:43', '2020-05-05 02:53:43', null, null);
INSERT INTO `user_logs` VALUES ('142', '17', '2020-05-04 13:47:25', '2020-05-05 03:47:25', null, null);
INSERT INTO `user_logs` VALUES ('143', '3', '2020-05-05 10:27:45', '2020-05-06 00:27:45', null, null);
INSERT INTO `user_logs` VALUES ('144', '17', '2020-05-05 12:59:35', '2020-05-06 02:59:35', null, null);
INSERT INTO `user_logs` VALUES ('145', '4', '2020-05-05 14:37:31', '2020-05-06 04:37:31', null, null);
INSERT INTO `user_logs` VALUES ('146', '3', '2020-05-05 15:03:30', '2020-05-06 05:03:30', null, null);
INSERT INTO `user_logs` VALUES ('147', '10', '2020-05-05 15:35:30', '2020-05-06 05:35:30', null, null);
INSERT INTO `user_logs` VALUES ('148', '17', '2020-05-05 16:38:41', '2020-05-06 06:38:41', null, null);
INSERT INTO `user_logs` VALUES ('149', '3', '2020-05-06 10:16:55', '2020-05-07 00:16:55', null, null);
INSERT INTO `user_logs` VALUES ('150', '4', '2020-05-06 14:12:12', '2020-05-07 04:12:12', null, null);
INSERT INTO `user_logs` VALUES ('151', '10', '2020-05-06 16:03:25', '2020-05-07 06:03:25', null, null);
INSERT INTO `user_logs` VALUES ('152', '3', '2020-05-06 20:05:46', '2020-05-07 10:05:46', null, null);
INSERT INTO `user_logs` VALUES ('153', '3', '2020-05-07 10:39:11', '2020-05-08 00:39:11', null, null);
INSERT INTO `user_logs` VALUES ('154', '4', '2020-05-07 14:02:09', '2020-05-08 04:02:09', null, null);
INSERT INTO `user_logs` VALUES ('155', '10', '2020-05-07 15:30:10', '2020-05-08 05:30:10', null, null);
INSERT INTO `user_logs` VALUES ('156', '4', '2020-05-07 20:43:15', '2020-05-08 10:43:15', null, null);
INSERT INTO `user_logs` VALUES ('157', '3', '2020-05-08 09:58:23', '2020-05-08 23:58:23', null, null);
INSERT INTO `user_logs` VALUES ('158', '5', '2020-05-08 10:47:39', '2020-05-09 00:47:39', null, null);
INSERT INTO `user_logs` VALUES ('159', '3', '2020-05-08 10:53:30', '2020-05-09 00:53:30', null, null);
INSERT INTO `user_logs` VALUES ('160', '10', '2020-05-08 11:32:44', '2020-05-09 01:32:44', null, null);
INSERT INTO `user_logs` VALUES ('161', '5', '2020-05-08 13:22:35', '2020-05-09 03:22:35', null, null);
INSERT INTO `user_logs` VALUES ('162', '3', '2020-05-08 13:34:33', '2020-05-09 03:34:33', null, null);
INSERT INTO `user_logs` VALUES ('163', '3', '2020-05-11 11:15:44', '2020-05-12 01:15:44', null, null);
INSERT INTO `user_logs` VALUES ('164', '10', '2020-05-11 12:14:14', '2020-05-12 02:14:14', null, null);
INSERT INTO `user_logs` VALUES ('165', '4', '2020-05-11 13:07:59', '2020-05-12 03:07:59', null, null);
INSERT INTO `user_logs` VALUES ('166', '17', '2020-05-11 16:51:57', '2020-05-12 06:51:57', null, null);
INSERT INTO `user_logs` VALUES ('167', '3', '2020-05-12 10:06:24', '2020-05-13 00:06:24', null, null);
INSERT INTO `user_logs` VALUES ('168', '4', '2020-05-12 10:59:35', '2020-05-13 00:59:35', null, null);
INSERT INTO `user_logs` VALUES ('169', '3', '2020-05-12 15:08:06', '2020-05-13 05:08:06', null, null);
INSERT INTO `user_logs` VALUES ('170', '3', '2020-05-12 17:24:01', '2020-05-13 07:24:01', null, null);
INSERT INTO `user_logs` VALUES ('171', '4', '2020-05-13 11:42:22', '2020-05-14 01:42:22', null, null);
INSERT INTO `user_logs` VALUES ('172', '3', '2020-05-13 11:58:05', '2020-05-14 01:58:05', null, null);
INSERT INTO `user_logs` VALUES ('173', '10', '2020-05-13 14:44:37', '2020-05-14 04:44:37', null, null);
INSERT INTO `user_logs` VALUES ('174', '9', '2020-05-13 15:09:58', '2020-05-14 05:09:58', null, null);
INSERT INTO `user_logs` VALUES ('175', '3', '2020-05-14 10:44:28', '2020-05-15 00:44:28', null, null);
INSERT INTO `user_logs` VALUES ('176', '4', '2020-05-14 11:20:15', '2020-05-15 01:20:15', null, null);
INSERT INTO `user_logs` VALUES ('177', '24', '2020-05-14 14:14:22', '2020-05-15 04:14:22', null, null);
INSERT INTO `user_logs` VALUES ('178', '3', '2020-05-14 18:30:03', '2020-05-15 08:30:03', null, null);
INSERT INTO `user_logs` VALUES ('179', '5', '2020-05-15 10:22:10', '2020-05-16 00:22:10', null, null);
INSERT INTO `user_logs` VALUES ('180', '17', '2020-05-15 11:12:48', '2020-05-16 01:12:48', null, null);
INSERT INTO `user_logs` VALUES ('181', '3', '2020-05-15 11:59:36', '2020-05-16 01:59:36', null, null);
INSERT INTO `user_logs` VALUES ('182', '10', '2020-05-15 13:51:24', '2020-05-16 03:51:24', null, null);
INSERT INTO `user_logs` VALUES ('183', '1', '2020-05-18 05:25:51', '2020-05-18 19:25:51', null, null);
INSERT INTO `user_logs` VALUES ('184', '3', '2020-05-18 09:56:02', '2020-05-18 23:56:02', null, null);
INSERT INTO `user_logs` VALUES ('185', '17', '2020-05-18 10:40:31', '2020-05-19 00:40:31', null, null);
INSERT INTO `user_logs` VALUES ('186', '10', '2020-05-18 11:50:18', '2020-05-19 01:50:18', null, null);
INSERT INTO `user_logs` VALUES ('187', '17', '2020-05-18 12:13:20', '2020-05-19 02:13:20', null, null);
INSERT INTO `user_logs` VALUES ('188', '3', '2020-05-18 13:26:34', '2020-05-19 03:26:34', null, null);
INSERT INTO `user_logs` VALUES ('189', '3', '2020-05-18 13:54:26', '2020-05-19 03:54:26', null, null);
INSERT INTO `user_logs` VALUES ('190', '17', '2020-05-19 09:53:18', '2020-05-19 23:53:18', null, null);
INSERT INTO `user_logs` VALUES ('191', '3', '2020-05-19 10:03:10', '2020-05-20 00:03:10', null, null);
INSERT INTO `user_logs` VALUES ('192', '9', '2020-05-19 10:44:39', '2020-05-20 00:44:39', null, null);
INSERT INTO `user_logs` VALUES ('193', '4', '2020-05-19 12:11:03', '2020-05-20 02:11:03', null, null);
INSERT INTO `user_logs` VALUES ('194', '3', '2020-05-19 13:09:00', '2020-05-20 03:09:00', null, null);
INSERT INTO `user_logs` VALUES ('195', '4', '2020-05-19 15:06:32', '2020-05-20 05:06:32', null, null);
INSERT INTO `user_logs` VALUES ('196', '3', '2020-05-20 11:10:14', '2020-05-21 01:10:14', null, null);
INSERT INTO `user_logs` VALUES ('197', '4', '2020-05-20 11:24:24', '2020-05-21 01:24:24', null, null);
INSERT INTO `user_logs` VALUES ('198', '3', '2020-05-20 17:18:05', '2020-05-21 07:18:05', null, null);
INSERT INTO `user_logs` VALUES ('199', '3', '2020-05-21 09:41:39', '2020-05-21 23:41:39', null, null);
INSERT INTO `user_logs` VALUES ('200', '17', '2020-05-21 10:46:47', '2020-05-22 00:46:47', null, null);
INSERT INTO `user_logs` VALUES ('201', '4', '2020-05-21 12:40:18', '2020-05-22 02:40:18', null, null);
INSERT INTO `user_logs` VALUES ('202', '37', '2020-05-21 13:32:02', '2020-05-22 03:32:02', null, null);
INSERT INTO `user_logs` VALUES ('203', '10', '2020-05-21 13:51:32', '2020-05-22 03:51:32', null, null);
INSERT INTO `user_logs` VALUES ('204', '24', '2020-05-21 15:15:19', '2020-05-22 05:15:19', null, null);
INSERT INTO `user_logs` VALUES ('205', '17', '2020-05-21 16:00:08', '2020-05-22 06:00:08', null, null);
INSERT INTO `user_logs` VALUES ('206', '3', '2020-05-21 17:09:13', '2020-05-22 07:09:13', null, null);
INSERT INTO `user_logs` VALUES ('207', '17', '2020-05-22 09:55:04', '2020-05-22 23:55:04', null, null);
INSERT INTO `user_logs` VALUES ('208', '3', '2020-05-22 13:02:41', '2020-05-23 03:02:41', null, null);
INSERT INTO `user_logs` VALUES ('209', '1', '2020-05-25 02:13:52', '2020-05-25 16:13:52', null, null);
INSERT INTO `user_logs` VALUES ('210', '3', '2020-05-25 09:57:23', '2020-05-25 23:57:23', null, null);
INSERT INTO `user_logs` VALUES ('211', '3', '2020-05-25 19:20:15', '2020-05-26 09:20:15', null, null);
INSERT INTO `user_logs` VALUES ('212', '3', '2020-05-25 19:40:18', '2020-05-26 09:40:18', null, null);
INSERT INTO `user_logs` VALUES ('213', '1', '2020-05-26 08:20:37', '2020-05-26 22:20:37', null, null);
INSERT INTO `user_logs` VALUES ('214', '3', '2020-05-26 09:58:21', '2020-05-26 23:58:21', null, null);
INSERT INTO `user_logs` VALUES ('215', '10', '2020-05-26 10:33:14', '2020-05-27 00:33:14', null, null);
INSERT INTO `user_logs` VALUES ('216', '8', '2020-05-26 10:36:14', '2020-05-27 00:36:14', null, null);
INSERT INTO `user_logs` VALUES ('217', '4', '2020-05-26 11:29:38', '2020-05-27 01:29:38', null, null);
INSERT INTO `user_logs` VALUES ('218', '17', '2020-05-26 14:43:18', '2020-05-27 04:43:18', null, null);
INSERT INTO `user_logs` VALUES ('219', '10', '2020-05-26 16:36:43', '2020-05-27 06:36:43', null, null);
INSERT INTO `user_logs` VALUES ('220', '17', '2020-05-26 16:58:56', '2020-05-27 06:58:56', null, null);
INSERT INTO `user_logs` VALUES ('221', '3', '2020-05-27 11:49:01', '2020-05-28 01:49:01', null, null);
INSERT INTO `user_logs` VALUES ('222', '10', '2020-05-27 12:35:14', '2020-05-28 02:35:14', null, null);
INSERT INTO `user_logs` VALUES ('223', '3', '2020-05-27 12:59:10', '2020-05-28 02:59:10', null, null);
INSERT INTO `user_logs` VALUES ('224', '17', '2020-05-27 13:00:23', '2020-05-28 03:00:23', null, null);
INSERT INTO `user_logs` VALUES ('225', '4', '2020-05-27 14:42:10', '2020-05-28 04:42:10', null, null);
INSERT INTO `user_logs` VALUES ('226', '3', '2020-05-27 15:09:05', '2020-05-28 05:09:05', null, null);
INSERT INTO `user_logs` VALUES ('227', '17', '2020-05-27 15:11:47', '2020-05-28 05:11:47', null, null);
INSERT INTO `user_logs` VALUES ('228', '3', '2020-05-27 15:19:21', '2020-05-28 05:19:21', null, null);
INSERT INTO `user_logs` VALUES ('229', '17', '2020-05-27 15:32:56', '2020-05-28 05:32:56', null, null);
INSERT INTO `user_logs` VALUES ('230', '10', '2020-05-28 10:04:13', '2020-05-29 00:04:13', null, null);
INSERT INTO `user_logs` VALUES ('231', '3', '2020-05-28 11:11:30', '2020-05-29 01:11:30', null, null);
INSERT INTO `user_logs` VALUES ('232', '4', '2020-05-28 15:16:19', '2020-05-29 05:16:19', null, null);
INSERT INTO `user_logs` VALUES ('233', '17', '2020-05-28 15:47:19', '2020-05-29 05:47:19', null, null);
INSERT INTO `user_logs` VALUES ('234', '3', '2020-05-28 20:51:26', '2020-05-29 10:51:26', null, null);
INSERT INTO `user_logs` VALUES ('235', '3', '2020-05-29 09:14:34', '2020-05-29 23:14:34', null, null);
INSERT INTO `user_logs` VALUES ('236', '5', '2020-05-29 10:29:05', '2020-05-30 00:29:05', null, null);
INSERT INTO `user_logs` VALUES ('237', '10', '2020-05-29 10:41:04', '2020-05-30 00:41:04', null, null);
INSERT INTO `user_logs` VALUES ('238', '4', '2020-05-29 12:25:32', '2020-05-30 02:25:32', null, null);
INSERT INTO `user_logs` VALUES ('239', '8', '2020-05-29 12:54:07', '2020-05-30 02:54:07', null, null);
INSERT INTO `user_logs` VALUES ('240', '9', '2020-05-29 13:48:07', '2020-05-30 03:48:07', null, null);
INSERT INTO `user_logs` VALUES ('241', '5', '2020-05-29 14:14:25', '2020-05-30 04:14:25', null, null);
INSERT INTO `user_logs` VALUES ('242', '3', '2020-05-29 14:17:04', '2020-05-30 04:17:04', null, null);
INSERT INTO `user_logs` VALUES ('243', '3', '2020-05-30 08:57:19', '2020-05-30 22:57:19', null, null);
INSERT INTO `user_logs` VALUES ('244', '3', '2020-05-31 10:54:08', '2020-06-01 00:54:08', null, null);
INSERT INTO `user_logs` VALUES ('245', '3', '2020-05-31 16:22:30', '2020-06-01 06:22:30', null, null);
INSERT INTO `user_logs` VALUES ('246', '10', '2020-06-01 10:34:38', '2020-06-02 00:34:38', null, null);
INSERT INTO `user_logs` VALUES ('247', '4', '2020-06-01 10:47:18', '2020-06-02 00:47:18', null, null);
INSERT INTO `user_logs` VALUES ('248', '3', '2020-06-01 11:03:15', '2020-06-02 01:03:15', null, null);
INSERT INTO `user_logs` VALUES ('249', '17', '2020-06-01 13:21:11', '2020-06-02 03:21:11', null, null);
INSERT INTO `user_logs` VALUES ('250', '4', '2020-06-01 13:29:28', '2020-06-02 03:29:28', null, null);
INSERT INTO `user_logs` VALUES ('251', '10', '2020-06-01 14:31:27', '2020-06-02 04:31:27', null, null);
INSERT INTO `user_logs` VALUES ('252', '4', '2020-06-01 16:32:14', '2020-06-02 06:32:14', null, null);
INSERT INTO `user_logs` VALUES ('253', '10', '2020-06-01 17:44:51', '2020-06-02 07:44:51', null, null);
INSERT INTO `user_logs` VALUES ('254', '10', '2020-06-02 10:03:47', '2020-06-03 00:03:47', null, null);
INSERT INTO `user_logs` VALUES ('255', '3', '2020-06-02 10:10:10', '2020-06-03 00:10:10', null, null);
INSERT INTO `user_logs` VALUES ('256', '5', '2020-06-02 11:24:16', '2020-06-03 01:24:16', null, null);
INSERT INTO `user_logs` VALUES ('257', '8', '2020-06-02 12:48:59', '2020-06-03 02:48:59', null, null);
INSERT INTO `user_logs` VALUES ('258', '4', '2020-06-02 14:15:06', '2020-06-03 04:15:06', null, null);
INSERT INTO `user_logs` VALUES ('259', '24', '2020-06-02 16:24:38', '2020-06-03 06:24:38', null, null);
INSERT INTO `user_logs` VALUES ('260', '10', '2020-06-03 10:04:36', '2020-06-04 00:04:36', null, null);
INSERT INTO `user_logs` VALUES ('261', '4', '2020-06-03 12:18:46', '2020-06-04 02:18:46', null, null);
INSERT INTO `user_logs` VALUES ('262', '10', '2020-06-03 12:50:05', '2020-06-04 02:50:05', null, null);
INSERT INTO `user_logs` VALUES ('263', '10', '2020-06-03 15:38:08', '2020-06-04 05:38:08', null, null);
INSERT INTO `user_logs` VALUES ('264', '4', '2020-06-03 17:54:52', '2020-06-04 07:54:52', null, null);
INSERT INTO `user_logs` VALUES ('265', '10', '2020-06-04 10:04:14', '2020-06-05 00:04:14', null, null);
INSERT INTO `user_logs` VALUES ('266', '4', '2020-06-04 14:02:50', '2020-06-05 04:02:50', null, null);
INSERT INTO `user_logs` VALUES ('267', '1', '2020-06-05 02:59:10', '2020-06-05 16:59:10', null, null);
INSERT INTO `user_logs` VALUES ('268', '10', '2020-06-05 10:04:28', '2020-06-06 00:04:28', null, null);
INSERT INTO `user_logs` VALUES ('269', '9', '2020-06-05 10:41:02', '2020-06-06 00:41:02', null, null);
INSERT INTO `user_logs` VALUES ('270', '5', '2020-06-05 10:46:20', '2020-06-06 00:46:20', null, null);
INSERT INTO `user_logs` VALUES ('271', '4', '2020-06-05 11:11:54', '2020-06-06 01:11:54', null, null);
INSERT INTO `user_logs` VALUES ('272', '8', '2020-06-05 11:36:36', '2020-06-06 01:36:36', null, null);
INSERT INTO `user_logs` VALUES ('273', '9', '2020-06-05 12:49:27', '2020-06-06 02:49:27', null, null);
INSERT INTO `user_logs` VALUES ('274', '17', '2020-06-05 13:41:11', '2020-06-06 03:41:11', null, null);
INSERT INTO `user_logs` VALUES ('275', '4', '2020-06-05 15:47:47', '2020-06-06 05:47:47', null, null);
INSERT INTO `user_logs` VALUES ('276', '24', '2020-06-06 01:23:22', '2020-06-06 15:23:22', null, null);
INSERT INTO `user_logs` VALUES ('277', '3', '2020-06-08 07:03:04', '2020-06-08 21:03:04', null, null);
INSERT INTO `user_logs` VALUES ('278', '1', '2020-06-08 10:42:08', '2020-06-09 00:42:08', null, null);
INSERT INTO `user_logs` VALUES ('279', '17', '2020-06-08 11:55:50', '2020-06-09 01:55:50', null, null);
INSERT INTO `user_logs` VALUES ('280', '4', '2020-06-08 13:33:05', '2020-06-09 03:33:05', null, null);
INSERT INTO `user_logs` VALUES ('281', '8', '2020-06-08 13:54:15', '2020-06-09 03:54:15', null, null);
INSERT INTO `user_logs` VALUES ('282', '17', '2020-06-08 16:28:20', '2020-06-09 06:28:20', null, null);
INSERT INTO `user_logs` VALUES ('283', '1', '2020-06-09 01:48:15', '2020-06-09 15:48:15', null, null);
INSERT INTO `user_logs` VALUES ('284', '3', '2020-06-09 08:45:33', '2020-06-09 22:45:33', null, null);
INSERT INTO `user_logs` VALUES ('285', '17', '2020-06-09 10:49:53', '2020-06-10 00:49:53', null, null);
INSERT INTO `user_logs` VALUES ('286', '10', '2020-06-09 11:48:41', '2020-06-10 01:48:41', null, null);
INSERT INTO `user_logs` VALUES ('287', '10', '2020-06-09 14:04:40', '2020-06-10 04:04:40', null, null);
INSERT INTO `user_logs` VALUES ('288', '10', '2020-06-10 11:08:40', '2020-06-11 01:08:40', null, null);
INSERT INTO `user_logs` VALUES ('289', '17', '2020-06-10 11:08:49', '2020-06-11 01:08:49', null, null);
INSERT INTO `user_logs` VALUES ('290', '5', '2020-06-10 11:53:11', '2020-06-11 01:53:11', null, null);
INSERT INTO `user_logs` VALUES ('291', '5', '2020-06-10 11:54:38', '2020-06-11 01:54:38', null, null);
INSERT INTO `user_logs` VALUES ('292', '10', '2020-06-10 19:31:11', '2020-06-11 09:31:11', null, null);
INSERT INTO `user_logs` VALUES ('293', '10', '2020-06-10 23:29:52', '2020-06-11 13:29:52', null, null);
INSERT INTO `user_logs` VALUES ('294', '3', '2020-06-11 09:53:41', '2020-06-11 23:53:41', null, null);
INSERT INTO `user_logs` VALUES ('295', '10', '2020-06-11 10:06:21', '2020-06-12 00:06:21', null, null);
INSERT INTO `user_logs` VALUES ('296', '5', '2020-06-11 10:35:18', '2020-06-12 00:35:18', null, null);
INSERT INTO `user_logs` VALUES ('297', '8', '2020-06-11 11:29:50', '2020-06-12 01:29:50', null, null);
INSERT INTO `user_logs` VALUES ('298', '17', '2020-06-11 15:16:25', '2020-06-12 05:16:25', null, null);
INSERT INTO `user_logs` VALUES ('299', '3', '2020-06-11 15:16:48', '2020-06-12 05:16:48', null, null);
INSERT INTO `user_logs` VALUES ('300', '5', '2020-06-12 10:21:21', '2020-06-13 00:21:21', null, null);
INSERT INTO `user_logs` VALUES ('301', '3', '2020-06-12 10:39:57', '2020-06-13 00:39:57', null, null);
INSERT INTO `user_logs` VALUES ('302', '17', '2020-06-12 12:04:59', '2020-06-13 02:04:59', null, null);
INSERT INTO `user_logs` VALUES ('303', '3', '2020-06-15 10:26:40', '2020-06-16 00:26:40', null, null);
INSERT INTO `user_logs` VALUES ('304', '4', '2020-06-15 11:31:02', '2020-06-16 01:31:02', null, null);
INSERT INTO `user_logs` VALUES ('305', '10', '2020-06-15 11:53:17', '2020-06-16 01:53:17', null, null);
INSERT INTO `user_logs` VALUES ('306', '17', '2020-06-15 13:09:41', '2020-06-16 03:09:41', null, null);
INSERT INTO `user_logs` VALUES ('307', '10', '2020-06-15 15:28:16', '2020-06-16 05:28:16', null, null);
INSERT INTO `user_logs` VALUES ('308', '8', '2020-06-15 18:59:32', '2020-06-16 08:59:32', null, null);
INSERT INTO `user_logs` VALUES ('309', '8', '2020-06-16 06:19:07', '2020-06-16 20:19:07', null, null);
INSERT INTO `user_logs` VALUES ('310', '10', '2020-06-16 10:05:49', '2020-06-17 00:05:49', null, null);
INSERT INTO `user_logs` VALUES ('311', '3', '2020-06-16 10:12:26', '2020-06-17 00:12:26', null, null);
INSERT INTO `user_logs` VALUES ('312', '4', '2020-06-16 12:01:48', '2020-06-17 02:01:48', null, null);
INSERT INTO `user_logs` VALUES ('313', '10', '2020-06-16 12:07:34', '2020-06-17 02:07:34', null, null);
INSERT INTO `user_logs` VALUES ('314', '8', '2020-06-16 14:06:28', '2020-06-17 04:06:28', null, null);
INSERT INTO `user_logs` VALUES ('315', '10', '2020-06-16 14:33:31', '2020-06-17 04:33:31', null, null);
INSERT INTO `user_logs` VALUES ('316', '17', '2020-06-16 15:46:47', '2020-06-17 05:46:47', null, null);
INSERT INTO `user_logs` VALUES ('317', '3', '2020-06-17 10:19:59', '2020-06-18 00:19:59', null, null);
INSERT INTO `user_logs` VALUES ('318', '4', '2020-06-17 10:31:13', '2020-06-18 00:31:13', null, null);
INSERT INTO `user_logs` VALUES ('319', '10', '2020-06-17 15:06:18', '2020-06-18 05:06:18', null, null);
INSERT INTO `user_logs` VALUES ('320', '4', '2020-06-17 16:11:20', '2020-06-18 06:11:20', null, null);
INSERT INTO `user_logs` VALUES ('321', '3', '2020-06-18 10:08:31', '2020-06-19 00:08:31', null, null);
INSERT INTO `user_logs` VALUES ('322', '8', '2020-06-18 10:59:30', '2020-06-19 00:59:30', null, null);
INSERT INTO `user_logs` VALUES ('323', '10', '2020-06-18 12:01:32', '2020-06-19 02:01:32', null, null);
INSERT INTO `user_logs` VALUES ('324', '3', '2020-06-18 14:20:12', '2020-06-19 04:20:12', null, null);
INSERT INTO `user_logs` VALUES ('325', '4', '2020-06-18 14:50:31', '2020-06-19 04:50:31', null, null);
INSERT INTO `user_logs` VALUES ('326', '3', '2020-06-19 10:22:29', '2020-06-20 00:22:29', null, null);
INSERT INTO `user_logs` VALUES ('327', '5', '2020-06-19 10:33:53', '2020-06-20 00:33:53', null, null);
INSERT INTO `user_logs` VALUES ('328', '8', '2020-06-19 10:52:09', '2020-06-20 00:52:09', null, null);
INSERT INTO `user_logs` VALUES ('329', '4', '2020-06-19 11:37:44', '2020-06-20 01:37:44', null, null);
INSERT INTO `user_logs` VALUES ('330', '9', '2020-06-19 13:36:42', '2020-06-20 03:36:42', null, null);
INSERT INTO `user_logs` VALUES ('331', '4', '2020-06-19 14:57:56', '2020-06-20 04:57:56', null, null);
INSERT INTO `user_logs` VALUES ('332', '3', '2020-06-22 10:15:12', '2020-06-23 00:15:12', null, null);
INSERT INTO `user_logs` VALUES ('333', '5', '2020-06-22 10:48:12', '2020-06-23 00:48:12', null, null);
INSERT INTO `user_logs` VALUES ('334', '5', '2020-06-22 11:29:11', '2020-06-23 01:29:11', null, null);
INSERT INTO `user_logs` VALUES ('335', '24', '2020-06-22 12:01:29', '2020-06-23 02:01:29', null, null);
INSERT INTO `user_logs` VALUES ('336', '10', '2020-06-22 13:20:40', '2020-06-23 03:20:40', null, null);
INSERT INTO `user_logs` VALUES ('337', '3', '2020-06-22 14:17:30', '2020-06-23 04:17:30', null, null);
INSERT INTO `user_logs` VALUES ('338', '3', '2020-06-23 10:14:08', '2020-06-24 00:14:08', null, null);
INSERT INTO `user_logs` VALUES ('339', '10', '2020-06-23 11:42:26', '2020-06-24 01:42:26', null, null);
INSERT INTO `user_logs` VALUES ('340', '5', '2020-06-23 12:02:57', '2020-06-24 02:02:57', null, null);
INSERT INTO `user_logs` VALUES ('341', '5', '2020-06-23 12:03:22', '2020-06-24 02:03:22', null, null);
INSERT INTO `user_logs` VALUES ('342', '5', '2020-06-23 12:21:46', '2020-06-24 02:21:46', null, null);
INSERT INTO `user_logs` VALUES ('343', '17', '2020-06-23 14:26:38', '2020-06-24 04:26:38', null, null);
INSERT INTO `user_logs` VALUES ('344', '5', '2020-06-23 14:41:55', '2020-06-24 04:41:55', null, null);
INSERT INTO `user_logs` VALUES ('345', '10', '2020-06-23 15:10:26', '2020-06-24 05:10:26', null, null);
INSERT INTO `user_logs` VALUES ('346', '4', '2020-06-23 16:56:26', '2020-06-24 06:56:26', null, null);
INSERT INTO `user_logs` VALUES ('347', '3', '2020-06-24 10:39:50', '2020-06-25 00:39:50', null, null);
INSERT INTO `user_logs` VALUES ('348', '4', '2020-06-24 13:57:01', '2020-06-25 03:57:01', null, null);
INSERT INTO `user_logs` VALUES ('349', '17', '2020-06-24 16:29:25', '2020-06-25 06:29:25', null, null);
INSERT INTO `user_logs` VALUES ('350', '3', '2020-06-25 10:17:22', '2020-06-26 00:17:22', null, null);
INSERT INTO `user_logs` VALUES ('351', '5', '2020-06-25 11:44:06', '2020-06-26 01:44:06', null, null);
INSERT INTO `user_logs` VALUES ('352', '8', '2020-06-25 12:34:10', '2020-06-26 02:34:10', null, null);
INSERT INTO `user_logs` VALUES ('353', '10', '2020-06-25 14:09:57', '2020-06-26 04:09:57', null, null);
INSERT INTO `user_logs` VALUES ('354', '3', '2020-06-25 16:09:09', '2020-06-26 06:09:09', null, null);
INSERT INTO `user_logs` VALUES ('355', '3', '2020-06-26 10:37:37', '2020-06-27 00:37:37', null, null);
INSERT INTO `user_logs` VALUES ('356', '4', '2020-06-26 10:41:03', '2020-06-27 00:41:03', null, null);
INSERT INTO `user_logs` VALUES ('357', '5', '2020-06-26 11:15:46', '2020-06-27 01:15:46', null, null);
INSERT INTO `user_logs` VALUES ('358', '17', '2020-06-26 15:58:30', '2020-06-27 05:58:30', null, null);
INSERT INTO `user_logs` VALUES ('359', '4', '2020-06-26 16:29:15', '2020-06-27 06:29:15', null, null);
INSERT INTO `user_logs` VALUES ('360', '1', '2020-06-27 11:50:53', '2020-06-28 01:50:53', null, null);
INSERT INTO `user_logs` VALUES ('361', '3', '2020-06-29 10:18:48', '2020-06-30 00:18:48', null, null);
INSERT INTO `user_logs` VALUES ('362', '8', '2020-06-29 11:28:03', '2020-06-30 01:28:03', null, null);
INSERT INTO `user_logs` VALUES ('363', '10', '2020-06-29 12:18:04', '2020-06-30 02:18:04', null, null);
INSERT INTO `user_logs` VALUES ('364', '4', '2020-06-29 12:52:03', '2020-06-30 02:52:03', null, null);
INSERT INTO `user_logs` VALUES ('365', '3', '2020-06-30 10:04:54', '2020-07-01 00:04:54', null, null);
INSERT INTO `user_logs` VALUES ('366', '4', '2020-06-30 12:19:41', '2020-07-01 02:19:41', null, null);
INSERT INTO `user_logs` VALUES ('367', '3', '2020-06-30 12:50:13', '2020-07-01 02:50:13', null, null);
INSERT INTO `user_logs` VALUES ('368', '10', '2020-06-30 14:37:37', '2020-07-01 04:37:37', null, null);
INSERT INTO `user_logs` VALUES ('369', '10', '2020-06-30 17:10:06', '2020-07-01 07:10:06', null, null);
INSERT INTO `user_logs` VALUES ('370', '3', '2020-06-30 21:54:43', '2020-07-01 11:54:43', null, null);
INSERT INTO `user_logs` VALUES ('371', '3', '2020-07-01 08:56:58', '2020-07-01 22:56:58', null, null);
INSERT INTO `user_logs` VALUES ('372', '17', '2020-07-01 13:37:23', '2020-07-02 03:37:23', null, null);
INSERT INTO `user_logs` VALUES ('373', '3', '2020-07-01 16:38:04', '2020-07-02 06:38:04', null, null);
INSERT INTO `user_logs` VALUES ('374', '24', '2020-07-01 18:13:25', '2020-07-02 08:13:25', null, null);
INSERT INTO `user_logs` VALUES ('375', '5', '2020-07-02 11:24:23', '2020-07-03 01:24:23', null, null);
INSERT INTO `user_logs` VALUES ('376', '17', '2020-07-02 14:05:54', '2020-07-03 04:05:54', null, null);
INSERT INTO `user_logs` VALUES ('377', '24', '2020-07-02 17:22:32', '2020-07-03 07:22:32', null, null);
INSERT INTO `user_logs` VALUES ('378', '24', '2020-07-02 17:23:33', '2020-07-03 07:23:33', null, null);
INSERT INTO `user_logs` VALUES ('379', '24', '2020-07-02 17:26:10', '2020-07-03 07:26:10', null, null);
INSERT INTO `user_logs` VALUES ('380', '17', '2020-07-03 10:53:35', '2020-07-04 00:53:35', null, null);
INSERT INTO `user_logs` VALUES ('381', '4', '2020-07-03 11:44:19', '2020-07-04 01:44:19', null, null);
INSERT INTO `user_logs` VALUES ('382', '4', '2020-07-03 14:54:43', '2020-07-04 04:54:43', null, null);
INSERT INTO `user_logs` VALUES ('383', '1', '2020-07-04 13:29:49', '2020-07-05 03:29:49', null, null);
INSERT INTO `user_logs` VALUES ('384', '10', '2020-07-06 10:33:12', '2020-07-07 00:33:12', null, null);
INSERT INTO `user_logs` VALUES ('385', '5', '2020-07-06 10:35:53', '2020-07-07 00:35:53', null, null);
INSERT INTO `user_logs` VALUES ('386', '3', '2020-07-06 10:57:33', '2020-07-07 00:57:33', null, null);
INSERT INTO `user_logs` VALUES ('387', '4', '2020-07-06 11:48:51', '2020-07-07 01:48:51', null, null);
INSERT INTO `user_logs` VALUES ('388', '8', '2020-07-06 12:42:26', '2020-07-07 02:42:26', null, null);
INSERT INTO `user_logs` VALUES ('389', '10', '2020-07-06 15:37:12', '2020-07-07 05:37:12', null, null);
INSERT INTO `user_logs` VALUES ('390', '24', '2020-07-06 15:38:11', '2020-07-07 05:38:11', null, null);
INSERT INTO `user_logs` VALUES ('391', '17', '2020-07-06 16:35:23', '2020-07-07 06:35:23', null, null);
INSERT INTO `user_logs` VALUES ('392', '1', '2020-07-07 05:48:51', '2020-07-07 19:48:51', null, null);
INSERT INTO `user_logs` VALUES ('393', '3', '2020-07-07 10:40:45', '2020-07-08 00:40:45', null, null);
INSERT INTO `user_logs` VALUES ('394', '10', '2020-07-07 11:39:45', '2020-07-08 01:39:45', null, null);
INSERT INTO `user_logs` VALUES ('395', '4', '2020-07-07 12:31:49', '2020-07-08 02:31:49', null, null);
INSERT INTO `user_logs` VALUES ('396', '17', '2020-07-07 14:58:59', '2020-07-08 04:58:59', null, null);
INSERT INTO `user_logs` VALUES ('397', '3', '2020-07-07 15:14:55', '2020-07-08 05:14:55', null, null);
INSERT INTO `user_logs` VALUES ('398', '8', '2020-07-07 15:43:31', '2020-07-08 05:43:31', null, null);
INSERT INTO `user_logs` VALUES ('399', '10', '2020-07-07 16:19:14', '2020-07-08 06:19:14', null, null);
INSERT INTO `user_logs` VALUES ('400', '24', '2020-07-07 16:52:19', '2020-07-08 06:52:19', null, null);
INSERT INTO `user_logs` VALUES ('401', '8', '2020-07-08 10:01:37', '2020-07-09 00:01:37', null, null);
INSERT INTO `user_logs` VALUES ('402', '3', '2020-07-08 10:09:26', '2020-07-09 00:09:26', null, null);
INSERT INTO `user_logs` VALUES ('403', '10', '2020-07-08 10:55:56', '2020-07-09 00:55:56', null, null);
INSERT INTO `user_logs` VALUES ('404', '5', '2020-07-08 11:28:54', '2020-07-09 01:28:54', null, null);
INSERT INTO `user_logs` VALUES ('405', '9', '2020-07-08 11:40:51', '2020-07-09 01:40:51', null, null);
INSERT INTO `user_logs` VALUES ('406', '8', '2020-07-08 15:00:11', '2020-07-09 05:00:11', null, null);
INSERT INTO `user_logs` VALUES ('407', '3', '2020-07-08 17:42:59', '2020-07-09 07:42:59', null, null);
INSERT INTO `user_logs` VALUES ('408', '3', '2020-07-09 09:23:59', '2020-07-09 23:23:59', null, null);
INSERT INTO `user_logs` VALUES ('409', '4', '2020-07-09 12:35:01', '2020-07-10 02:35:01', null, null);
INSERT INTO `user_logs` VALUES ('410', '3', '2020-07-09 15:02:51', '2020-07-10 05:02:51', null, null);
INSERT INTO `user_logs` VALUES ('411', '17', '2020-07-09 15:49:55', '2020-07-10 05:49:55', null, null);
INSERT INTO `user_logs` VALUES ('412', '10', '2020-07-09 18:02:25', '2020-07-10 08:02:25', null, null);
INSERT INTO `user_logs` VALUES ('413', '10', '2020-07-10 10:08:10', '2020-07-11 00:08:10', null, null);
INSERT INTO `user_logs` VALUES ('414', '17', '2020-07-10 10:19:15', '2020-07-11 00:19:15', null, null);
INSERT INTO `user_logs` VALUES ('415', '5', '2020-07-10 11:42:19', '2020-07-11 01:42:19', null, null);
INSERT INTO `user_logs` VALUES ('416', '9', '2020-07-10 11:42:51', '2020-07-11 01:42:51', null, null);
INSERT INTO `user_logs` VALUES ('417', '3', '2020-07-13 10:17:56', '2020-07-14 00:17:56', null, null);
INSERT INTO `user_logs` VALUES ('418', '10', '2020-07-13 11:10:23', '2020-07-14 01:10:23', null, null);
INSERT INTO `user_logs` VALUES ('419', '8', '2020-07-13 11:50:16', '2020-07-14 01:50:16', null, null);
INSERT INTO `user_logs` VALUES ('420', '4', '2020-07-13 12:09:07', '2020-07-14 02:09:07', null, null);
INSERT INTO `user_logs` VALUES ('421', '46', '2020-07-13 15:24:48', '2020-07-14 05:24:48', null, null);
INSERT INTO `user_logs` VALUES ('422', '4', '2020-07-14 12:05:27', '2020-07-15 02:05:27', null, null);
INSERT INTO `user_logs` VALUES ('423', '10', '2020-07-14 12:13:42', '2020-07-15 02:13:42', null, null);
INSERT INTO `user_logs` VALUES ('424', '3', '2020-07-14 12:19:20', '2020-07-15 02:19:20', null, null);
INSERT INTO `user_logs` VALUES ('425', '3', '2020-07-14 13:15:42', '2020-07-15 03:15:42', null, null);
INSERT INTO `user_logs` VALUES ('426', '10', '2020-07-14 15:43:06', '2020-07-15 05:43:06', null, null);
INSERT INTO `user_logs` VALUES ('427', '17', '2020-07-14 16:03:23', '2020-07-15 06:03:23', null, null);
INSERT INTO `user_logs` VALUES ('428', '5', '2020-07-15 10:21:11', '2020-07-16 00:21:11', null, null);
INSERT INTO `user_logs` VALUES ('429', '10', '2020-07-15 10:31:00', '2020-07-16 00:31:00', null, null);
INSERT INTO `user_logs` VALUES ('430', '3', '2020-07-15 10:45:30', '2020-07-16 00:45:30', null, null);
INSERT INTO `user_logs` VALUES ('431', '17', '2020-07-15 11:41:06', '2020-07-16 01:41:06', null, null);
INSERT INTO `user_logs` VALUES ('432', '4', '2020-07-15 13:02:31', '2020-07-16 03:02:31', null, null);
INSERT INTO `user_logs` VALUES ('433', '3', '2020-07-16 06:46:43', '2020-07-16 20:46:43', null, null);
INSERT INTO `user_logs` VALUES ('434', '10', '2020-07-16 10:05:41', '2020-07-17 00:05:41', null, null);
INSERT INTO `user_logs` VALUES ('435', '3', '2020-07-16 12:24:44', '2020-07-17 02:24:44', null, null);
INSERT INTO `user_logs` VALUES ('436', '4', '2020-07-16 15:19:41', '2020-07-17 05:19:41', null, null);
INSERT INTO `user_logs` VALUES ('437', '3', '2020-07-16 15:21:53', '2020-07-17 05:21:53', null, null);
INSERT INTO `user_logs` VALUES ('438', '3', '2020-07-16 22:52:10', '2020-07-17 12:52:10', null, null);
INSERT INTO `user_logs` VALUES ('439', '10', '2020-07-17 10:59:38', '2020-07-18 00:59:38', null, null);
INSERT INTO `user_logs` VALUES ('440', '3', '2020-07-17 11:05:55', '2020-07-18 01:05:55', null, null);
INSERT INTO `user_logs` VALUES ('441', '5', '2020-07-17 11:28:23', '2020-07-18 01:28:23', null, null);
INSERT INTO `user_logs` VALUES ('442', '4', '2020-07-17 11:33:13', '2020-07-18 01:33:13', null, null);
INSERT INTO `user_logs` VALUES ('443', '17', '2020-07-17 12:23:02', '2020-07-18 02:23:02', null, null);
INSERT INTO `user_logs` VALUES ('444', '3', '2020-07-17 15:21:07', '2020-07-18 05:21:07', null, null);
INSERT INTO `user_logs` VALUES ('445', '10', '2020-07-17 17:35:19', '2020-07-18 07:35:19', null, null);
INSERT INTO `user_logs` VALUES ('446', '1', '2020-07-18 01:41:07', '2020-07-18 15:41:07', null, null);
INSERT INTO `user_logs` VALUES ('447', '10', '2020-07-20 10:12:12', '2020-07-21 00:12:12', null, null);
INSERT INTO `user_logs` VALUES ('448', '3', '2020-07-20 10:56:00', '2020-07-21 00:56:00', null, null);
INSERT INTO `user_logs` VALUES ('449', '5', '2020-07-20 11:03:49', '2020-07-21 01:03:49', null, null);
INSERT INTO `user_logs` VALUES ('450', '4', '2020-07-20 11:57:12', '2020-07-21 01:57:12', null, null);
INSERT INTO `user_logs` VALUES ('451', '9', '2020-07-20 14:09:46', '2020-07-21 04:09:46', null, null);
INSERT INTO `user_logs` VALUES ('452', '17', '2020-07-20 14:28:57', '2020-07-21 04:28:57', null, null);
INSERT INTO `user_logs` VALUES ('453', '10', '2020-07-21 10:30:58', '2020-07-22 00:30:58', null, null);
INSERT INTO `user_logs` VALUES ('454', '3', '2020-07-21 11:12:41', '2020-07-22 01:12:41', null, null);
INSERT INTO `user_logs` VALUES ('455', '4', '2020-07-21 11:13:46', '2020-07-22 01:13:46', null, null);
INSERT INTO `user_logs` VALUES ('456', '17', '2020-07-21 11:58:15', '2020-07-22 01:58:15', null, null);
INSERT INTO `user_logs` VALUES ('457', '10', '2020-07-21 17:42:45', '2020-07-22 07:42:45', null, null);
INSERT INTO `user_logs` VALUES ('458', '3', '2020-07-22 10:19:36', '2020-07-23 00:19:36', null, null);
INSERT INTO `user_logs` VALUES ('459', '10', '2020-07-22 10:55:55', '2020-07-23 00:55:55', null, null);
INSERT INTO `user_logs` VALUES ('460', '5', '2020-07-22 12:01:33', '2020-07-23 02:01:33', null, null);
INSERT INTO `user_logs` VALUES ('461', '9', '2020-07-22 13:23:09', '2020-07-23 03:23:09', null, null);
INSERT INTO `user_logs` VALUES ('462', '4', '2020-07-22 13:27:20', '2020-07-23 03:27:20', null, null);
INSERT INTO `user_logs` VALUES ('463', '10', '2020-07-22 14:43:24', '2020-07-23 04:43:24', null, null);
INSERT INTO `user_logs` VALUES ('464', '5', '2020-07-22 15:26:07', '2020-07-23 05:26:07', null, null);
INSERT INTO `user_logs` VALUES ('465', '10', '2020-07-23 10:03:17', '2020-07-24 00:03:17', null, null);
INSERT INTO `user_logs` VALUES ('466', '17', '2020-07-23 10:34:54', '2020-07-24 00:34:54', null, null);
INSERT INTO `user_logs` VALUES ('467', '3', '2020-07-23 10:52:27', '2020-07-24 00:52:27', null, null);
INSERT INTO `user_logs` VALUES ('468', '10', '2020-07-23 12:23:32', '2020-07-24 02:23:32', null, null);
INSERT INTO `user_logs` VALUES ('469', '17', '2020-07-23 14:51:48', '2020-07-24 04:51:48', null, null);
INSERT INTO `user_logs` VALUES ('470', '3', '2020-07-24 10:14:26', '2020-07-25 00:14:26', null, null);
INSERT INTO `user_logs` VALUES ('471', '10', '2020-07-24 10:34:55', '2020-07-25 00:34:55', null, null);
INSERT INTO `user_logs` VALUES ('472', '5', '2020-07-24 10:35:28', '2020-07-25 00:35:28', null, null);
INSERT INTO `user_logs` VALUES ('473', '3', '2020-07-24 11:59:41', '2020-07-25 01:59:41', null, null);
INSERT INTO `user_logs` VALUES ('474', '3', '2020-07-24 14:51:17', '2020-07-25 04:51:17', null, null);
INSERT INTO `user_logs` VALUES ('475', '3', '2020-07-27 10:15:36', '2020-07-28 00:15:36', null, null);
INSERT INTO `user_logs` VALUES ('476', '17', '2020-07-27 10:40:12', '2020-07-28 00:40:12', null, null);
INSERT INTO `user_logs` VALUES ('477', '5', '2020-07-27 11:33:35', '2020-07-28 01:33:35', null, null);
INSERT INTO `user_logs` VALUES ('478', '10', '2020-07-27 12:24:08', '2020-07-28 02:24:08', null, null);
INSERT INTO `user_logs` VALUES ('479', '3', '2020-07-28 10:40:14', '2020-07-29 00:40:14', null, null);
INSERT INTO `user_logs` VALUES ('480', '10', '2020-07-28 13:01:37', '2020-07-29 03:01:37', null, null);
INSERT INTO `user_logs` VALUES ('481', '17', '2020-07-28 16:35:39', '2020-07-29 06:35:39', null, null);
INSERT INTO `user_logs` VALUES ('482', '3', '2020-07-28 17:40:13', '2020-07-29 07:40:13', null, null);
INSERT INTO `user_logs` VALUES ('483', '24', '2020-07-28 18:53:34', '2020-07-29 08:53:34', null, null);
INSERT INTO `user_logs` VALUES ('484', '1', '2020-07-29 01:40:18', '2020-07-29 15:40:18', null, null);
INSERT INTO `user_logs` VALUES ('485', '1', '2020-07-29 01:57:04', '2020-07-29 15:57:04', null, null);
INSERT INTO `user_logs` VALUES ('486', '1', '2020-07-29 02:33:50', '2020-07-29 16:33:50', null, null);
INSERT INTO `user_logs` VALUES ('487', '1', '2020-07-29 03:36:02', '2020-07-29 17:36:02', null, null);
INSERT INTO `user_logs` VALUES ('488', '1', '2020-07-29 04:03:24', '2020-07-29 18:03:24', null, null);
INSERT INTO `user_logs` VALUES ('489', '1', '2020-07-29 04:11:05', '2020-07-29 18:11:05', null, null);
INSERT INTO `user_logs` VALUES ('490', '3', '2020-07-29 09:18:03', '2020-07-29 23:18:03', null, null);
INSERT INTO `user_logs` VALUES ('491', '5', '2020-07-29 10:20:40', '2020-07-30 00:20:40', null, null);
INSERT INTO `user_logs` VALUES ('492', '10', '2020-07-29 10:30:07', '2020-07-30 00:30:07', null, null);
INSERT INTO `user_logs` VALUES ('493', '17', '2020-07-29 11:11:17', '2020-07-30 01:11:17', null, null);
INSERT INTO `user_logs` VALUES ('494', '9', '2020-07-29 13:47:26', '2020-07-30 03:47:26', null, null);
INSERT INTO `user_logs` VALUES ('495', '5', '2020-07-29 15:46:59', '2020-07-30 05:46:59', null, null);
INSERT INTO `user_logs` VALUES ('496', '3', '2020-07-29 15:52:22', '2020-07-30 05:52:22', null, null);
INSERT INTO `user_logs` VALUES ('497', '1', '2020-07-29 22:45:17', '2020-07-30 12:45:17', null, null);
INSERT INTO `user_logs` VALUES ('498', '10', '2020-07-30 00:06:58', '2020-07-30 14:06:58', null, null);
INSERT INTO `user_logs` VALUES ('499', '3', '2020-07-30 09:55:11', '2020-07-30 23:55:11', null, null);
INSERT INTO `user_logs` VALUES ('500', '3', '2020-07-30 12:16:59', '2020-07-31 02:16:59', null, null);
INSERT INTO `user_logs` VALUES ('501', '10', '2020-07-30 13:37:16', '2020-07-31 03:37:16', null, null);
INSERT INTO `user_logs` VALUES ('502', '3', '2020-07-30 14:18:36', '2020-07-31 04:18:36', null, null);
INSERT INTO `user_logs` VALUES ('503', '8', '2020-07-30 17:33:21', '2020-07-31 07:33:21', null, null);
INSERT INTO `user_logs` VALUES ('504', '3', '2020-07-30 17:48:05', '2020-07-31 07:48:05', null, null);
INSERT INTO `user_logs` VALUES ('505', '3', '2020-07-31 08:10:38', '2020-07-31 22:10:38', null, null);
INSERT INTO `user_logs` VALUES ('506', '3', '2020-07-31 08:21:40', '2020-07-31 22:21:40', null, null);
INSERT INTO `user_logs` VALUES ('507', '5', '2020-07-31 10:15:23', '2020-08-01 00:15:23', null, null);
INSERT INTO `user_logs` VALUES ('508', '10', '2020-07-31 11:17:52', '2020-08-01 01:17:52', null, null);
INSERT INTO `user_logs` VALUES ('509', '8', '2020-07-31 12:23:50', '2020-08-01 02:23:50', null, null);
INSERT INTO `user_logs` VALUES ('510', '24', '2020-07-31 14:10:38', '2020-08-01 04:10:38', null, null);
INSERT INTO `user_logs` VALUES ('511', '10', '2020-07-31 14:37:40', '2020-08-01 04:37:40', null, null);
INSERT INTO `user_logs` VALUES ('512', '8', '2020-07-31 15:03:15', '2020-08-01 05:03:15', null, null);
INSERT INTO `user_logs` VALUES ('513', '3', '2020-08-02 13:41:22', '2020-08-03 03:41:22', null, null);
INSERT INTO `user_logs` VALUES ('514', '3', '2020-08-03 10:13:36', '2020-08-04 00:13:36', null, null);
INSERT INTO `user_logs` VALUES ('515', '8', '2020-08-03 10:46:31', '2020-08-04 00:46:31', null, null);
INSERT INTO `user_logs` VALUES ('516', '10', '2020-08-03 11:13:38', '2020-08-04 01:13:38', null, null);
INSERT INTO `user_logs` VALUES ('517', '5', '2020-08-03 12:08:52', '2020-08-04 02:08:52', null, null);
INSERT INTO `user_logs` VALUES ('518', '17', '2020-08-03 14:55:49', '2020-08-04 04:55:49', null, null);
INSERT INTO `user_logs` VALUES ('519', '10', '2020-08-03 14:59:57', '2020-08-04 04:59:57', null, null);
INSERT INTO `user_logs` VALUES ('520', '3', '2020-08-03 15:14:12', '2020-08-04 05:14:12', null, null);
INSERT INTO `user_logs` VALUES ('521', '10', '2020-08-03 15:25:07', '2020-08-04 05:25:07', null, null);
INSERT INTO `user_logs` VALUES ('522', '24', '2020-08-03 17:14:31', '2020-08-04 07:14:31', null, null);
INSERT INTO `user_logs` VALUES ('523', '10', '2020-08-04 10:04:37', '2020-08-05 00:04:37', null, null);
INSERT INTO `user_logs` VALUES ('524', '3', '2020-08-04 10:46:05', '2020-08-05 00:46:05', null, null);
INSERT INTO `user_logs` VALUES ('525', '3', '2020-08-04 20:27:08', '2020-08-05 10:27:08', null, null);
INSERT INTO `user_logs` VALUES ('526', '10', '2020-08-05 10:53:03', '2020-08-06 00:53:03', null, null);
INSERT INTO `user_logs` VALUES ('527', '3', '2020-08-05 10:55:34', '2020-08-06 00:55:34', null, null);
INSERT INTO `user_logs` VALUES ('528', '10', '2020-08-05 16:00:41', '2020-08-06 06:00:41', null, null);
INSERT INTO `user_logs` VALUES ('529', '3', '2020-08-06 09:33:46', '2020-08-06 23:33:46', null, null);
INSERT INTO `user_logs` VALUES ('530', '3', '2020-08-06 12:22:28', '2020-08-07 02:22:28', null, null);
INSERT INTO `user_logs` VALUES ('531', '10', '2020-08-06 12:43:29', '2020-08-07 02:43:29', null, null);
INSERT INTO `user_logs` VALUES ('532', '3', '2020-08-06 14:02:11', '2020-08-07 04:02:11', null, null);
INSERT INTO `user_logs` VALUES ('533', '10', '2020-08-06 15:54:07', '2020-08-07 05:54:07', null, null);
INSERT INTO `user_logs` VALUES ('534', '5', '2020-08-07 10:26:25', '2020-08-08 00:26:25', null, null);
INSERT INTO `user_logs` VALUES ('535', '3', '2020-08-07 10:27:24', '2020-08-08 00:27:24', null, null);
INSERT INTO `user_logs` VALUES ('536', '10', '2020-08-07 10:46:47', '2020-08-08 00:46:47', null, null);
INSERT INTO `user_logs` VALUES ('537', '8', '2020-08-07 12:39:44', '2020-08-08 02:39:44', null, null);
INSERT INTO `user_logs` VALUES ('538', '5', '2020-08-07 13:51:10', '2020-08-08 03:51:10', null, null);
INSERT INTO `user_logs` VALUES ('539', '3', '2020-08-10 10:09:45', '2020-08-11 00:09:45', null, null);
INSERT INTO `user_logs` VALUES ('540', '5', '2020-08-10 12:53:28', '2020-08-11 02:53:28', null, null);
INSERT INTO `user_logs` VALUES ('541', '10', '2020-08-10 13:11:25', '2020-08-11 03:11:25', null, null);
INSERT INTO `user_logs` VALUES ('542', '8', '2020-08-10 13:34:36', '2020-08-11 03:34:36', null, null);
INSERT INTO `user_logs` VALUES ('543', '3', '2020-08-10 15:45:09', '2020-08-11 05:45:09', null, null);
INSERT INTO `user_logs` VALUES ('544', '5', '2020-08-10 16:01:13', '2020-08-11 06:01:13', null, null);
INSERT INTO `user_logs` VALUES ('545', '10', '2020-08-10 16:27:41', '2020-08-11 06:27:41', null, null);
INSERT INTO `user_logs` VALUES ('546', '3', '2020-08-11 10:09:31', '2020-08-12 00:09:31', null, null);
INSERT INTO `user_logs` VALUES ('547', '3', '2020-08-12 09:56:56', '2020-08-12 23:56:56', null, null);
INSERT INTO `user_logs` VALUES ('548', '3', '2020-08-12 10:01:16', '2020-08-13 00:01:16', null, null);
INSERT INTO `user_logs` VALUES ('549', '10', '2020-08-12 10:29:37', '2020-08-13 00:29:37', null, null);
INSERT INTO `user_logs` VALUES ('550', '8', '2020-08-12 11:12:39', '2020-08-13 01:12:39', null, null);
INSERT INTO `user_logs` VALUES ('551', '5', '2020-08-12 11:16:40', '2020-08-13 01:16:40', null, null);
INSERT INTO `user_logs` VALUES ('552', '3', '2020-08-12 16:20:25', '2020-08-13 06:20:25', null, null);
INSERT INTO `user_logs` VALUES ('553', '3', '2020-08-12 16:22:40', '2020-08-13 06:22:40', null, null);
INSERT INTO `user_logs` VALUES ('554', '5', '2020-08-14 10:36:14', '2020-08-15 00:36:14', null, null);
INSERT INTO `user_logs` VALUES ('555', '10', '2020-08-14 10:55:46', '2020-08-15 00:55:46', null, null);
INSERT INTO `user_logs` VALUES ('556', '8', '2020-08-14 11:02:08', '2020-08-15 01:02:08', null, null);
INSERT INTO `user_logs` VALUES ('557', '3', '2020-08-14 11:08:37', '2020-08-15 01:08:37', null, null);
INSERT INTO `user_logs` VALUES ('558', '8', '2020-08-14 13:30:30', '2020-08-15 03:30:30', null, null);
INSERT INTO `user_logs` VALUES ('559', '9', '2020-08-14 14:46:05', '2020-08-15 04:46:05', null, null);
INSERT INTO `user_logs` VALUES ('560', '5', '2020-08-14 16:33:49', '2020-08-15 06:33:49', null, null);
INSERT INTO `user_logs` VALUES ('561', '17', '2020-08-14 16:41:19', '2020-08-15 06:41:19', null, null);
INSERT INTO `user_logs` VALUES ('562', '5', '2020-08-16 12:44:21', '2020-08-17 02:44:21', null, null);
INSERT INTO `user_logs` VALUES ('563', '3', '2020-08-17 09:50:14', '2020-08-17 23:50:14', null, null);
INSERT INTO `user_logs` VALUES ('564', '3', '2020-08-17 09:50:46', '2020-08-17 23:50:46', null, null);
INSERT INTO `user_logs` VALUES ('565', '5', '2020-08-17 10:54:06', '2020-08-18 00:54:06', null, null);
INSERT INTO `user_logs` VALUES ('566', '10', '2020-08-17 10:54:44', '2020-08-18 00:54:44', null, null);
INSERT INTO `user_logs` VALUES ('567', '3', '2020-08-17 12:42:55', '2020-08-18 02:42:55', null, null);
INSERT INTO `user_logs` VALUES ('568', '8', '2020-08-17 14:28:52', '2020-08-18 04:28:52', null, null);
INSERT INTO `user_logs` VALUES ('569', '9', '2020-08-17 14:36:57', '2020-08-18 04:36:57', null, null);
INSERT INTO `user_logs` VALUES ('570', '17', '2020-08-17 16:26:24', '2020-08-18 06:26:24', null, null);
INSERT INTO `user_logs` VALUES ('571', '8', '2020-08-17 17:32:46', '2020-08-18 07:32:46', null, null);
INSERT INTO `user_logs` VALUES ('572', '10', '2020-08-18 10:04:19', '2020-08-19 00:04:19', null, null);
INSERT INTO `user_logs` VALUES ('573', '17', '2020-08-18 10:51:17', '2020-08-19 00:51:17', null, null);
INSERT INTO `user_logs` VALUES ('574', '3', '2020-08-18 11:52:37', '2020-08-19 01:52:37', null, null);
INSERT INTO `user_logs` VALUES ('575', '17', '2020-08-18 16:22:57', '2020-08-19 06:22:57', null, null);
INSERT INTO `user_logs` VALUES ('576', '3', '2020-08-19 10:02:34', '2020-08-20 00:02:34', null, null);
INSERT INTO `user_logs` VALUES ('577', '3', '2020-08-19 10:55:55', '2020-08-20 00:55:55', null, null);
INSERT INTO `user_logs` VALUES ('578', '10', '2020-08-19 11:13:57', '2020-08-20 01:13:57', null, null);
INSERT INTO `user_logs` VALUES ('579', '5', '2020-08-19 11:22:16', '2020-08-20 01:22:16', null, null);
INSERT INTO `user_logs` VALUES ('580', '8', '2020-08-19 11:46:39', '2020-08-20 01:46:39', null, null);
INSERT INTO `user_logs` VALUES ('581', '9', '2020-08-19 14:48:54', '2020-08-20 04:48:54', null, null);
INSERT INTO `user_logs` VALUES ('582', '10', '2020-08-19 15:32:10', '2020-08-20 05:32:10', null, null);
INSERT INTO `user_logs` VALUES ('583', '3', '2020-08-20 10:10:02', '2020-08-21 00:10:02', null, null);
INSERT INTO `user_logs` VALUES ('584', '10', '2020-08-20 13:06:16', '2020-08-21 03:06:16', null, null);
INSERT INTO `user_logs` VALUES ('585', '17', '2020-08-20 15:49:24', '2020-08-21 05:49:24', null, null);
INSERT INTO `user_logs` VALUES ('586', '3', '2020-08-21 10:05:55', '2020-08-22 00:05:55', null, null);
INSERT INTO `user_logs` VALUES ('587', '10', '2020-08-21 10:50:38', '2020-08-22 00:50:38', null, null);
INSERT INTO `user_logs` VALUES ('588', '8', '2020-08-21 11:00:02', '2020-08-22 01:00:02', null, null);
INSERT INTO `user_logs` VALUES ('589', '5', '2020-08-21 11:03:29', '2020-08-22 01:03:29', null, null);
INSERT INTO `user_logs` VALUES ('590', '17', '2020-08-21 11:08:12', '2020-08-22 01:08:12', null, null);
INSERT INTO `user_logs` VALUES ('591', '10', '2020-08-21 15:00:22', '2020-08-22 05:00:22', null, null);
INSERT INTO `user_logs` VALUES ('592', '1', '2020-08-24 04:04:48', '2020-08-24 18:04:48', null, null);
INSERT INTO `user_logs` VALUES ('593', '3', '2020-08-24 10:06:29', '2020-08-25 00:06:29', null, null);
INSERT INTO `user_logs` VALUES ('594', '10', '2020-08-24 10:47:49', '2020-08-25 00:47:49', null, null);
INSERT INTO `user_logs` VALUES ('595', '5', '2020-08-24 10:55:36', '2020-08-25 00:55:36', null, null);
INSERT INTO `user_logs` VALUES ('596', '8', '2020-08-24 11:18:22', '2020-08-25 01:18:22', null, null);
INSERT INTO `user_logs` VALUES ('597', '10', '2020-08-24 16:11:05', '2020-08-25 06:11:05', null, null);
INSERT INTO `user_logs` VALUES ('598', '8', '2020-08-24 16:52:16', '2020-08-25 06:52:16', null, null);
INSERT INTO `user_logs` VALUES ('599', '3', '2020-08-25 10:10:55', '2020-08-26 00:10:55', null, null);
INSERT INTO `user_logs` VALUES ('600', '10', '2020-08-25 11:32:25', '2020-08-26 01:32:25', null, null);
INSERT INTO `user_logs` VALUES ('601', '24', '2020-08-25 22:55:03', '2020-08-26 12:55:03', null, null);
INSERT INTO `user_logs` VALUES ('602', '3', '2020-08-26 09:59:06', '2020-08-26 23:59:06', null, null);
INSERT INTO `user_logs` VALUES ('603', '10', '2020-08-26 10:45:07', '2020-08-27 00:45:07', null, null);
INSERT INTO `user_logs` VALUES ('604', '17', '2020-08-26 15:19:10', '2020-08-27 05:19:10', null, null);
INSERT INTO `user_logs` VALUES ('605', '10', '2020-08-27 10:04:32', '2020-08-28 00:04:32', null, null);
INSERT INTO `user_logs` VALUES ('606', '3', '2020-08-27 11:03:38', '2020-08-28 01:03:38', null, null);
INSERT INTO `user_logs` VALUES ('607', '10', '2020-08-27 12:58:27', '2020-08-28 02:58:27', null, null);
INSERT INTO `user_logs` VALUES ('608', '5', '2020-08-27 14:15:40', '2020-08-28 04:15:40', null, null);
INSERT INTO `user_logs` VALUES ('609', '3', '2020-08-28 10:07:40', '2020-08-29 00:07:40', null, null);
INSERT INTO `user_logs` VALUES ('610', '5', '2020-08-28 10:33:24', '2020-08-29 00:33:24', null, null);
INSERT INTO `user_logs` VALUES ('611', '10', '2020-08-28 10:42:22', '2020-08-29 00:42:22', null, null);
INSERT INTO `user_logs` VALUES ('612', '8', '2020-08-28 11:01:11', '2020-08-29 01:01:11', null, null);
INSERT INTO `user_logs` VALUES ('613', '10', '2020-08-31 10:31:18', '2020-09-01 00:31:18', null, null);
INSERT INTO `user_logs` VALUES ('614', '3', '2020-08-31 10:48:37', '2020-09-01 00:48:37', null, null);
INSERT INTO `user_logs` VALUES ('615', '8', '2020-08-31 11:35:39', '2020-09-01 01:35:39', null, null);
INSERT INTO `user_logs` VALUES ('616', '9', '2020-08-31 13:58:09', '2020-09-01 03:58:09', null, null);
INSERT INTO `user_logs` VALUES ('617', '8', '2020-08-31 16:42:42', '2020-09-01 06:42:42', null, null);
INSERT INTO `user_logs` VALUES ('618', '17', '2020-08-31 16:46:28', '2020-09-01 06:46:28', null, null);
INSERT INTO `user_logs` VALUES ('619', '10', '2020-09-01 09:55:14', '2020-09-01 23:55:14', null, null);
INSERT INTO `user_logs` VALUES ('620', '17', '2020-09-01 09:56:38', '2020-09-01 23:56:38', null, null);
INSERT INTO `user_logs` VALUES ('621', '3', '2020-09-01 10:16:40', '2020-09-02 00:16:40', null, null);
INSERT INTO `user_logs` VALUES ('622', '17', '2020-09-01 13:16:14', '2020-09-02 03:16:14', null, null);
INSERT INTO `user_logs` VALUES ('623', '3', '2020-09-01 22:58:41', '2020-09-02 12:58:41', null, null);
INSERT INTO `user_logs` VALUES ('624', '5', '2020-09-02 10:20:36', '2020-09-03 00:20:36', null, null);
INSERT INTO `user_logs` VALUES ('625', '10', '2020-09-02 10:35:39', '2020-09-03 00:35:39', null, null);
INSERT INTO `user_logs` VALUES ('626', '3', '2020-09-02 10:59:28', '2020-09-03 00:59:28', null, null);
INSERT INTO `user_logs` VALUES ('627', '4', '2020-09-02 11:00:58', '2020-09-03 01:00:58', null, null);
INSERT INTO `user_logs` VALUES ('628', '8', '2020-09-02 11:01:00', '2020-09-03 01:01:00', null, null);
INSERT INTO `user_logs` VALUES ('629', '9', '2020-09-02 11:39:40', '2020-09-03 01:39:40', null, null);
INSERT INTO `user_logs` VALUES ('630', '10', '2020-09-02 12:40:13', '2020-09-03 02:40:13', null, null);
INSERT INTO `user_logs` VALUES ('631', '17', '2020-09-02 13:44:24', '2020-09-03 03:44:24', null, null);
INSERT INTO `user_logs` VALUES ('632', '3', '2020-09-02 17:35:48', '2020-09-03 07:35:48', null, null);
INSERT INTO `user_logs` VALUES ('633', '10', '2020-09-02 17:36:46', '2020-09-03 07:36:46', null, null);
INSERT INTO `user_logs` VALUES ('634', '5', '2020-09-02 19:36:37', '2020-09-03 09:36:37', null, null);
INSERT INTO `user_logs` VALUES ('635', '17', '2020-09-03 09:45:28', '2020-09-03 23:45:28', null, null);
INSERT INTO `user_logs` VALUES ('636', '10', '2020-09-03 10:03:39', '2020-09-04 00:03:39', null, null);
INSERT INTO `user_logs` VALUES ('637', '17', '2020-09-03 15:21:55', '2020-09-04 05:21:55', null, null);
INSERT INTO `user_logs` VALUES ('638', '9', '2020-09-03 15:51:40', '2020-09-04 05:51:40', null, null);
INSERT INTO `user_logs` VALUES ('639', '17', '2020-09-04 11:32:39', '2020-09-05 01:32:39', null, null);
INSERT INTO `user_logs` VALUES ('640', '1', '2020-09-08 02:37:42', '2020-09-08 16:37:42', null, null);
INSERT INTO `user_logs` VALUES ('641', '8', '2020-09-08 09:13:53', '2020-09-08 23:13:53', null, null);
INSERT INTO `user_logs` VALUES ('642', '3', '2020-09-08 09:40:42', '2020-09-08 23:40:42', null, null);
INSERT INTO `user_logs` VALUES ('643', '10', '2020-09-08 10:00:29', '2020-09-09 00:00:29', null, null);
INSERT INTO `user_logs` VALUES ('644', '17', '2020-09-08 12:54:50', '2020-09-09 02:54:50', null, null);
INSERT INTO `user_logs` VALUES ('645', '8', '2020-09-08 14:32:58', '2020-09-09 04:32:58', null, null);
INSERT INTO `user_logs` VALUES ('646', '10', '2020-09-08 15:14:41', '2020-09-09 05:14:41', null, null);
INSERT INTO `user_logs` VALUES ('647', '17', '2020-09-08 16:27:53', '2020-09-09 06:27:53', null, null);
INSERT INTO `user_logs` VALUES ('648', '1', '2020-09-09 01:19:29', '2020-09-09 15:19:29', null, null);
INSERT INTO `user_logs` VALUES ('649', '8', '2020-09-09 10:13:38', '2020-09-10 00:13:38', null, null);
INSERT INTO `user_logs` VALUES ('650', '3', '2020-09-09 10:15:40', '2020-09-10 00:15:40', null, null);
INSERT INTO `user_logs` VALUES ('651', '5', '2020-09-09 11:17:14', '2020-09-10 01:17:14', null, null);
INSERT INTO `user_logs` VALUES ('652', '3', '2020-09-09 11:34:12', '2020-09-10 01:34:12', null, null);
INSERT INTO `user_logs` VALUES ('653', '10', '2020-09-09 13:53:15', '2020-09-10 03:53:15', null, null);
INSERT INTO `user_logs` VALUES ('654', '17', '2020-09-09 14:05:26', '2020-09-10 04:05:26', null, null);
INSERT INTO `user_logs` VALUES ('655', '5', '2020-09-09 16:39:18', '2020-09-10 06:39:18', null, null);
INSERT INTO `user_logs` VALUES ('656', '5', '2020-09-09 16:42:10', '2020-09-10 06:42:10', null, null);
INSERT INTO `user_logs` VALUES ('657', '8', '2020-09-10 07:33:37', '2020-09-10 21:33:37', null, null);
INSERT INTO `user_logs` VALUES ('658', '10', '2020-09-10 09:57:46', '2020-09-10 23:57:46', null, null);
INSERT INTO `user_logs` VALUES ('659', '3', '2020-09-10 12:19:25', '2020-09-11 02:19:25', null, null);
INSERT INTO `user_logs` VALUES ('660', '17', '2020-09-10 13:17:49', '2020-09-11 03:17:49', null, null);
INSERT INTO `user_logs` VALUES ('661', '10', '2020-09-10 13:18:20', '2020-09-11 03:18:20', null, null);
INSERT INTO `user_logs` VALUES ('662', '3', '2020-09-11 10:10:01', '2020-09-12 00:10:01', null, null);
INSERT INTO `user_logs` VALUES ('663', '5', '2020-09-11 10:22:41', '2020-09-12 00:22:41', null, null);
INSERT INTO `user_logs` VALUES ('664', '10', '2020-09-11 11:44:14', '2020-09-12 01:44:14', null, null);
INSERT INTO `user_logs` VALUES ('665', '8', '2020-09-11 12:10:05', '2020-09-12 02:10:05', null, null);
INSERT INTO `user_logs` VALUES ('666', '3', '2020-09-11 14:01:09', '2020-09-12 04:01:09', null, null);
INSERT INTO `user_logs` VALUES ('667', '10', '2020-09-11 16:04:52', '2020-09-12 06:04:52', null, null);
INSERT INTO `user_logs` VALUES ('668', '3', '2020-09-14 10:07:39', '2020-09-15 00:07:39', null, null);
INSERT INTO `user_logs` VALUES ('669', '10', '2020-09-14 10:15:21', '2020-09-15 00:15:21', null, null);
INSERT INTO `user_logs` VALUES ('670', '17', '2020-09-14 12:39:33', '2020-09-15 02:39:33', null, null);
INSERT INTO `user_logs` VALUES ('671', '9', '2020-09-14 14:15:27', '2020-09-15 04:15:27', null, null);
INSERT INTO `user_logs` VALUES ('672', '5', '2020-09-14 14:17:57', '2020-09-15 04:17:57', null, null);
INSERT INTO `user_logs` VALUES ('673', '3', '2020-09-14 15:40:36', '2020-09-15 05:40:36', null, null);
INSERT INTO `user_logs` VALUES ('674', '10', '2020-09-14 16:03:48', '2020-09-15 06:03:48', null, null);
INSERT INTO `user_logs` VALUES ('675', '17', '2020-09-14 16:19:54', '2020-09-15 06:19:54', null, null);
INSERT INTO `user_logs` VALUES ('676', '9', '2020-09-14 17:34:05', '2020-09-15 07:34:05', null, null);
INSERT INTO `user_logs` VALUES ('677', '10', '2020-09-15 10:01:10', '2020-09-16 00:01:10', null, null);
INSERT INTO `user_logs` VALUES ('678', '17', '2020-09-15 11:17:01', '2020-09-16 01:17:01', null, null);
INSERT INTO `user_logs` VALUES ('679', '10', '2020-09-15 12:52:26', '2020-09-16 02:52:26', null, null);
INSERT INTO `user_logs` VALUES ('680', '3', '2020-09-15 13:33:08', '2020-09-16 03:33:08', null, null);
INSERT INTO `user_logs` VALUES ('681', '17', '2020-09-15 15:42:19', '2020-09-16 05:42:19', null, null);
INSERT INTO `user_logs` VALUES ('682', '3', '2020-09-16 10:08:49', '2020-09-17 00:08:49', null, null);
INSERT INTO `user_logs` VALUES ('683', '9', '2020-09-16 10:30:32', '2020-09-17 00:30:32', null, null);
INSERT INTO `user_logs` VALUES ('684', '5', '2020-09-16 10:32:01', '2020-09-17 00:32:01', null, null);
INSERT INTO `user_logs` VALUES ('685', '10', '2020-09-16 10:38:15', '2020-09-17 00:38:15', null, null);
INSERT INTO `user_logs` VALUES ('686', '1', '2020-09-16 23:55:37', '2020-09-17 13:55:37', null, null);
INSERT INTO `user_logs` VALUES ('687', '10', '2020-09-17 10:06:59', '2020-09-18 00:06:59', null, null);
INSERT INTO `user_logs` VALUES ('688', '3', '2020-09-17 10:25:02', '2020-09-18 00:25:02', null, null);
INSERT INTO `user_logs` VALUES ('689', '17', '2020-09-17 10:54:34', '2020-09-18 00:54:34', null, null);
INSERT INTO `user_logs` VALUES ('690', '10', '2020-09-17 13:22:30', '2020-09-18 03:22:30', null, null);
INSERT INTO `user_logs` VALUES ('691', '10', '2020-09-18 10:25:23', '2020-09-19 00:25:23', null, null);
INSERT INTO `user_logs` VALUES ('692', '3', '2020-09-18 10:52:00', '2020-09-19 00:52:00', null, null);
INSERT INTO `user_logs` VALUES ('693', '9', '2020-09-18 11:04:45', '2020-09-19 01:04:45', null, null);
INSERT INTO `user_logs` VALUES ('694', '5', '2020-09-18 11:47:32', '2020-09-19 01:47:32', null, null);
INSERT INTO `user_logs` VALUES ('695', '3', '2020-09-18 16:22:47', '2020-09-19 06:22:47', null, null);
INSERT INTO `user_logs` VALUES ('696', '5', '2020-09-21 10:37:20', '2020-09-22 00:37:20', null, null);
INSERT INTO `user_logs` VALUES ('697', '3', '2020-09-21 10:42:12', '2020-09-22 00:42:12', null, null);
INSERT INTO `user_logs` VALUES ('698', '9', '2020-09-21 12:17:28', '2020-09-22 02:17:28', null, null);
INSERT INTO `user_logs` VALUES ('699', '10', '2020-09-21 12:40:08', '2020-09-22 02:40:08', null, null);
INSERT INTO `user_logs` VALUES ('700', '17', '2020-09-21 14:18:36', '2020-09-22 04:18:36', null, null);
INSERT INTO `user_logs` VALUES ('701', '3', '2020-09-21 16:07:15', '2020-09-22 06:07:15', null, null);
INSERT INTO `user_logs` VALUES ('702', '8', '2020-09-21 17:13:01', '2020-09-22 07:13:01', null, null);
INSERT INTO `user_logs` VALUES ('703', '10', '2020-09-22 10:04:36', '2020-09-23 00:04:36', null, null);
INSERT INTO `user_logs` VALUES ('704', '3', '2020-09-22 10:25:52', '2020-09-23 00:25:52', null, null);
INSERT INTO `user_logs` VALUES ('705', '9', '2020-09-22 12:33:00', '2020-09-23 02:33:00', null, null);
INSERT INTO `user_logs` VALUES ('706', '1', '2020-09-23 04:03:33', '2020-09-23 04:03:33', null, null);
INSERT INTO `user_logs` VALUES ('707', '1', '2020-09-23 04:13:38', '2020-09-23 04:13:38', null, null);
INSERT INTO `user_logs` VALUES ('708', '1', '2020-11-04 02:38:54', '2020-11-04 02:38:54', null, null);
INSERT INTO `user_logs` VALUES ('709', '1', '2020-11-04 03:13:03', '2020-11-04 03:13:03', null, null);
INSERT INTO `user_logs` VALUES ('710', '1', '2020-11-05 01:28:48', '2020-11-05 01:28:48', null, null);
|
-- Drop the stored procedure called 'SP_SelectAllStates' in schema 'dbo'
IF EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE SPECIFIC_SCHEMA = N'dbo'
AND SPECIFIC_NAME = N'SP_SelectAllStates'
)
DROP PROCEDURE dbo.SP_SelectAllStates
GO |
<filename>DapperStore.Infra/Scripts/create_database.sql<gh_stars>0
CREATE TABLE Customer
(
Id CHAR(36) PRIMARY KEY NOT NULL,
FirstName VARCHAR2(40) NOT NULL,
LastName VARCHAR2(40) NOT NULL,
Document CHAR(11) NOT NULL,
Email VARCHAR2(160) NOT NULL,
Phone VARCHAR2(13) NOT NULL
);
CREATE TABLE Address
(
Id CHAR(36) PRIMARY KEY NOT NULL,
CustomerId CHAR(36) NOT NULL,
Number VARCHAR2(10) NOT NULL,
Complement VARCHAR2(40) NOT NULL,
District VARCHAR2(60) NOT NULL,
City VARCHAR2(60) NOT NULL,
State CHAR(2) NOT NULL,
Country CHAR(2) NOT NULL,
ZipCode CHAR(8) NOT NULL,
Type NUMBER(10) DEFAULT (1) NOT NULL ,
FOREIGN KEY (CustomerId) REFERENCES Customer(Id)
);
CREATE TABLE Product
(
Id CHAR(36) PRIMARY KEY NOT NULL,
Title VARCHAR2(255) NOT NULL,
Description CLOB NOT NULL,
Image VARCHAR2(1024) NOT NULL,
Price NUMBER NOT NULL,
QuantityOnHand NUMBER(10, 2) NOT NULL,
);
CREATE TABLE Order
(
Id CHAR(36) PRIMARY KEY NOT NULL,
CustomerId CHAR(36) NOT NULL,
CreateDate TIMESTAMP(3) DEFAULT (SYSTIMESTAMP) NOT NULL ,
Status NUMBER(10) DEFAULT (1) NOT NULL ,
FOREIGN KEY(CustomerId) REFERENCES Customer(Id)
);
CREATE TABLE OrderItem (
Id CHAR(36) PRIMARY KEY NOT NULL,
OrderId CHAR(36) NOT NULL,
ProductId CHAR(36) NOT NULL,
Quantity NUMBER(10, 2) NOT NULL,
Price NUMBER NOT NULL,
FOREIGN KEY(OrderId) REFERENCES Order(Id),
FOREIGN KEY(ProductId) REFERENCES Product(Id)
);
CREATE TABLE Delivery (
Id CHAR(36) PRIMARY KEY NOT NULL,
OrderId CHAR(36) NOT NULL,
CreateDate TIMESTAMP(3) DEFAULT (SYSTIMESTAMP) NOT NULL ,
EstimatedDeliveryDate TIMESTAMP(3) NOT NULL,
Status NUMBER(10) DEFAULT (1) NOT NULL ,
FOREIGN KEY(OrderId) REFERENCES Order(Id)
); |
<reponame>BooRad45/burger<gh_stars>0
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers (
id INT AUTO_INCREMENT NOT NULL ,
burger_name VARCHAR(255) NOT NULL,
devoured BOOLEAN DEFAULT false,
createdAt TIMESTAMP NOT NULL,
PRIMARY KEY (id)
);
|
alter TABLE t_lc_duncase add COLUMN score int(11) DEFAULT NULL COMMENT '催收评分';
alter TABLE t_lc_score add COLUMN sendflag char(1) DEFAULT NULL COMMENT '是否推送案件表(0未推送,1已推送)';
insert into sys_job( job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time )values( '更新评分', 'SYSTEM', 'ScoreTimer.updateDuncaseScoreTimer', '0 0/5 * * * ? ', '1', '0', '0', 'admin', sysdate() );
update t_lc_column_query SET table_prefix = 'd' where table_name = 't_lc_task' and table_prefix = 'tt' and column_name_cn = '催收评分';
update t_lc_column_query SET table_prefix = 't' where table_name = 't_lc_duncase' and table_prefix = 'tt' and column_name_cn = '催收评分';
-- delete from t_lc_score t WHERE t.score is null and EXISTS(
-- select 1 from org_package a WHERE t.org_id= a.dept_id and a.is_auto_score != '1'
-- )
delete from t_lc_score t WHERE t.score is null and is_auto_score != '1' |
/*
Warnings:
- You are about to drop the `_BookToPublisher` table. If the table is not empty, all the data it contains will be lost.
- Added the required column `publisherId` to the `Book` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE "_BookToPublisher" DROP CONSTRAINT "_BookToPublisher_A_fkey";
-- DropForeignKey
ALTER TABLE "_BookToPublisher" DROP CONSTRAINT "_BookToPublisher_B_fkey";
-- AlterTable
ALTER TABLE "Book" ADD COLUMN "publisherId" TEXT NOT NULL;
-- DropTable
DROP TABLE "_BookToPublisher";
-- AddForeignKey
ALTER TABLE "Book" ADD FOREIGN KEY ("publisherId") REFERENCES "Publisher"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.0.5
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jul 17, 2014 at 04:56 PM
-- Server version: 5.5.37
-- PHP Version: 5.5.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `bunga`
--
-- --------------------------------------------------------
--
-- Table structure for table `pelanggan`
--
CREATE TABLE IF NOT EXISTS `pelanggan` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nama` varchar(45) DEFAULT NULL,
`alamat` varchar(100) DEFAULT NULL,
`no_hp` varchar(12) DEFAULT NULL,
`email` varchar(45) DEFAULT NULL,
`kode_pos` varchar(6) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
--
-- Dumping data for table `pelanggan`
--
INSERT INTO `pelanggan` (`id`, `nama`, `alamat`, `no_hp`, `email`, `kode_pos`) VALUES
(1, 'nitta', 'jerman', '08190898909', '<EMAIL>', '83355'),
(2, 'Juichan', 'Mataram', '08199371234', '<EMAIL>', '83311'),
(3, 'rohul', 'belanda', '078878898', '<EMAIL>', '83355'),
(4, 'q', 'q', '1', '<EMAIL>', '12');
-- --------------------------------------------------------
--
-- Table structure for table `tbl_bunga`
--
CREATE TABLE IF NOT EXISTS `tbl_bunga` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`nama` varchar(30) DEFAULT NULL,
`gambar` varchar(45) DEFAULT NULL,
`harga` decimal(8,0) DEFAULT NULL,
`nama_latin` varchar(30) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
--
-- Dumping data for table `tbl_bunga`
--
INSERT INTO `tbl_bunga` (`id`, `nama`, `gambar`, `harga`, `nama_latin`) VALUES
(1, 'mawar merah', 'images/red rose.png', 45000, 'red rose'),
(2, 'mawar merah muda', 'images/pink rose.jpg', 50000, 'pink rose'),
(3, 'tulips merah', 'images/bunga tulip.jpg', 65000, 'tulipa'),
(4, 'tulips kuning', 'images/Tulips.jpg', 50000, 'tulipa'),
(5, 'kamboja', 'images/bunga kamboja putih.jpg', 30000, 'Plumeria alba'),
(6, 'sun flower', 'images/matahari.jpg', 75000, 'Helianthus annus'),
(7, 'alamanda', 'images/bunga anggrek.jpg', 45000, 'Golden Trumpet'),
(8, 'bunga bangkai', 'images/bunga bangkai.jpg', 35000, 'Amorphpophallus titanium'),
(9, 'raflesia', 'images/bunga raflesia.jpg', 55000, 'raflesia arnoldi'),
(10, 'cempaka kuning', 'images/bunga cempaka kuning.jpg', 60000, 'Interest chrysolite'),
(11, 'bunga bangkai', 'images/bunga bangkai.jpg', 45000, 'raflesia arnoldi');
-- --------------------------------------------------------
--
-- Table structure for table `tbl_pemesanan`
--
CREATE TABLE IF NOT EXISTS `tbl_pemesanan` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tbl_pelanggan_id` int(11) NOT NULL,
`tbl_bunga_id` int(11) NOT NULL,
`harga` decimal(10,0) NOT NULL,
`jumlah` int(15) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;
--
-- Dumping data for table `tbl_pemesanan`
--
INSERT INTO `tbl_pemesanan` (`id`, `tbl_pelanggan_id`, `tbl_bunga_id`, `harga`, `jumlah`) VALUES
(7, 2, 6, 45000, 5),
(8, 1, 6, 50000, 2);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
CREATE FUNCTION [dbo].[dnn_GetFileFolderFunc](@FolderD INT)
RETURNS nvarchar(246)
AS
BEGIN
DECLARE @folderPath nvarchar(246)
select @folderPath=folderpath from dbo.[dnn_Folders] where folderid=@FolderD
return @folderPath
END;
|
<gh_stars>1-10
/*
Navicat Premium Data Transfer
Source Server : Localhost
Source Server Type : MySQL
Source Server Version : 50723
Source Host : localhost:3306
Source Schema : cronflow
Target Server Type : MySQL
Target Server Version : 50723
File Encoding : 65001
Date: 28/08/2018 19:22:41
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for flow
-- ----------------------------
DROP TABLE IF EXISTS `flow`;
CREATE TABLE `flow` (
`flowId` int(11) unsigned NOT NULL AUTO_INCREMENT,
`flowName` longtext NOT NULL,
`flowTags` longtext,
`triggerType` char(24) NOT NULL DEFAULT '',
`cron` varchar(255) DEFAULT NULL,
`flowTimezone` char(255) DEFAULT NULL,
`flowNodes` int(11) NOT NULL DEFAULT '0',
`flowState` char(24) NOT NULL DEFAULT 'INIT',
`triggerCount` int(11) NOT NULL DEFAULT '0',
`flowDescription` longtext,
`latestDate` datetime DEFAULT NULL,
`latestStatus` char(255) DEFAULT NULL,
`nextDate` datetime DEFAULT NULL,
`createdAt` datetime NOT NULL,
`creator` int(11) NOT NULL,
`updatedAt` datetime NOT NULL,
`updater` int(11) NOT NULL,
PRIMARY KEY (`flowId`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of flow
-- ----------------------------
BEGIN;
INSERT INTO `flow` VALUES (1, 'TestFlow', 'cron,active,test', 'active', '* * * * *', 'Asia/Shanghai', 0, 'ACTIVE', 0, '这是一个Test的Cronflow\r\n每三分钟触发一次', NULL, NULL, NULL, '2018-08-15 07:23:49', 1, '2018-08-28 11:21:51', 1);
COMMIT;
-- ----------------------------
-- Table structure for flow_history
-- ----------------------------
DROP TABLE IF EXISTS `flow_history`;
CREATE TABLE `flow_history` (
`historyId` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
`flowId` int(11) NOT NULL,
`triggeredAt` datetime NOT NULL,
`executeStartAt` datetime NOT NULL,
`executeEndAt` datetime NOT NULL,
`processInfo` longtext CHARACTER SET latin1 NOT NULL,
`createdAt` datetime NOT NULL,
PRIMARY KEY (`historyId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for node
-- ----------------------------
DROP TABLE IF EXISTS `node`;
CREATE TABLE `node` (
`nodeId` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`flowId` bigint(20) unsigned NOT NULL,
`parentId` bigint(20) unsigned NOT NULL COMMENT '0表示根节点',
`sequence` int(10) unsigned NOT NULL,
`signal` enum('ANY','SUCCESS','FAILURE') NOT NULL,
`pluginId` bigint(11) NOT NULL,
`configurations` longtext NOT NULL,
`creator` int(10) unsigned NOT NULL,
`createdAt` datetime NOT NULL,
`updater` int(10) unsigned NOT NULL,
`updatedAt` datetime NOT NULL,
PRIMARY KEY (`nodeId`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of node
-- ----------------------------
BEGIN;
INSERT INTO `node` VALUES (1, 1, 0, 0, 'ANY', 1, '{\"method\":\"GET\",\"uri\":\"http://raven.tuotest.ihealthcn.com/alive\",\"qs\":\"\",\"headers\":\"\",\"body\":\"\",\"extends\":\"\"}', 1, '2018-08-16 09:40:12', 1, '2018-08-16 09:40:12');
INSERT INTO `node` VALUES (2, 1, 1, 0, 'SUCCESS', 1, '{\"method\":\"GET\",\"uri\":\"http://raven.tuotest.ihealthcn.com/alive\",\"qs\":\"\",\"headers\":\"\",\"body\":\"\",\"extends\":\"\"}', 1, '2018-08-20 13:33:45', 1, '2018-08-20 13:33:49');
INSERT INTO `node` VALUES (3, 1, 2, 0, 'SUCCESS', 1, '{\"method\":\"GET\",\"uri\":\"http://raven.tuotest.ihealthcn.com/alive\",\"qs\":\"\",\"headers\":\"\",\"body\":\"\",\"extends\":\"\"}', 1, '2018-08-20 13:35:18', 1, '2018-08-20 13:35:22');
INSERT INTO `node` VALUES (4, 1, 3, 0, 'SUCCESS', 1, '{\"method\":\"GET\",\"uri\":\"http://raven.tuotest.ihealthcn.com/alive\",\"qs\":\"\",\"headers\":\"\",\"body\":\"\",\"extends\":\"\"}', 1, '2018-08-20 14:14:56', 1, '2018-08-20 14:14:59');
COMMIT;
-- ----------------------------
-- Table structure for plugin
-- ----------------------------
DROP TABLE IF EXISTS `plugin`;
CREATE TABLE `plugin` (
`pluginId` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
`pluginName` varchar(256) NOT NULL,
`pluginDesc` longtext,
`pluginRepo` varchar(512) NOT NULL,
`pluginTargetDir` varchar(256) DEFAULT NULL,
`pluginPath` varchar(1024) NOT NULL,
`pluginCompiledPath` varchar(1024) NOT NULL,
`pluginVersion` varchar(256) NOT NULL,
`pluginWorkBranch` varchar(256) NOT NULL,
`createdAt` datetime NOT NULL,
`creator` int(11) NOT NULL,
`updatedAt` datetime NOT NULL,
`updater` int(11) NOT NULL,
PRIMARY KEY (`pluginId`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of plugin
-- ----------------------------
BEGIN;
INSERT INTO `plugin` VALUES (1, 'HTTP', 'Http plugin for viaflow by request/request', 'https://github.com/viaflow/plugin-http.git', NULL, '/cronflow/plugins/plugin-http', '/cronflow/plugins/plugin-http/viaflow_compiled', '1.0.0', 'master', '2018-08-27 06:14:23', 1, '2018-08-27 06:14:23', 1);
COMMIT;
-- ----------------------------
-- Table structure for temp_data
-- ----------------------------
DROP TABLE IF EXISTS `temp_data`;
CREATE TABLE `temp_data` (
`id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of temp_data
-- ----------------------------
BEGIN;
INSERT INTO `temp_data` VALUES (1);
COMMIT;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`userId` int(11) unsigned NOT NULL AUTO_INCREMENT,
`userName` char(255) NOT NULL DEFAULT '',
`userToken` char(255) DEFAULT NULL,
`userPassword` char(255) NOT NULL DEFAULT '',
`userRole` char(1) NOT NULL DEFAULT '',
`controlTags` longtext,
`creator` int(11) NOT NULL,
`createdAt` datetime NOT NULL,
`updater` int(11) NOT NULL,
`updatedAt` datetime NOT NULL,
PRIMARY KEY (`userId`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES (1, 'sa1', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzYTEiLCJyb2xlIjoiMCIsImlhdCI6MTUzNDc1ODAzOCwiZXhwIjoxNTM1MzYyODM4LCJhdWQiOiJjcm9uZmxvdyJ9.qFx5FaMarNCUQq9dPA3FDvPbJ41pH_-G2AuuFaDXRFg', '123456', '0', 'all', 1, '2018-06-16 00:00:00', 1, '2018-08-20 09:40:38');
INSERT INTO `user` VALUES (2, 'sa2', 'test-sa2', '123456', '0', 'all', 1, '2018-06-16 00:00:00', 1, '2018-06-16 00:00:00');
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;
|
<filename>egov/egov-ptis/src/main/resources/db/migration/main/V20170104182913__ptis_mutation_fee_add_slabname.sql
alter table egpt_mutation_fee_details add column slab_name varchar(500);
|
-- Table: public.sentences
-- DROP TABLE public.sentences;
CREATE TABLE IF NOT EXISTS public.sentences
(
"sentenceId" integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
sentence text COLLATE pg_catalog."default",
assign boolean NOT NULL DEFAULT false,
"fileName" text COLLATE pg_catalog."default",
"userId" text COLLATE pg_catalog."default",
"assignDate" date,
"userName" text COLLATE pg_catalog."default",
"ageGroup" text COLLATE pg_catalog."default",
gender text COLLATE pg_catalog."default",
"motherTongue" text COLLATE pg_catalog."default",
label text COLLATE pg_catalog."default" NOT NULL DEFAULT 'hard'::text,
language text COLLATE pg_catalog."default",
CONSTRAINT sentences_pkey PRIMARY KEY ("sentenceId")
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public.sentences
OWNER to postgres;
-- GRANT UPDATE, INSERT, SELECT ON TABLE public.sentences TO crowdsourcedbuser;
GRANT ALL ON TABLE public.sentences TO postgres;
-- Index: language
-- DROP INDEX public.language;
CREATE INDEX IF NOT EXISTS language
ON public.sentences USING btree
(language COLLATE pg_catalog."default" ASC NULLS LAST)
TABLESPACE pg_default;
-- Index: sentenceid
-- DROP INDEX public.sentenceid;
CREATE INDEX IF NOT EXISTS sentenceid
ON public.sentences USING btree
("sentenceId" ASC NULLS LAST)
TABLESPACE pg_default;
-- Index: sentences_filename
-- DROP INDEX public.sentences_filename;
-- CREATE INDEX IF NOT EXISTS sentences_filename
-- ON public.sentences USING btree
-- ("fileName" COLLATE pg_catalog."default" ASC NULLS LAST)
-- TABLESPACE pg_default;
-- Index: sentences_userid
-- DROP INDEX public.sentences_userid;
-- CREATE INDEX IF NOT EXISTS sentences_userid
-- ON public.sentences USING btree
-- ("userId" COLLATE pg_catalog."default" ASC NULLS LAST)
-- TABLESPACE pg_default;
-- Index: sentences_username
-- DROP INDEX public.sentences_username;
-- CREATE INDEX IF NOT EXISTS sentences_username
-- ON public.sentences USING btree
-- ("userName" COLLATE pg_catalog."default" ASC NULLS LAST)
-- TABLESPACE pg_default;
-- Trigger: insert_sentences_trigger
-- DROP TRIGGER insert_sentences_trigger ON public.sentences;
-- CREATE TRIGGER IF NOT EXISTS insert_sentences_trigger
-- BEFORE INSERT
-- ON public.sentences
-- FOR EACH ROW
-- EXECUTE PROCEDURE public.sentences_insert_trigger();
-- Table: public.odia_sentences
-- DROP TABLE public.odia_sentences;
CREATE TABLE IF NOT EXISTS public.odia_sentences
(
-- Inherited from table public.sentences: "sentenceId" integer NOT NULL,
-- Inherited from table public.sentences: sentence text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: assign boolean NOT NULL DEFAULT false,
-- Inherited from table public.sentences: "fileName" text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: "userId" text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: "assignDate" date,
-- Inherited from table public.sentences: "userName" text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: "ageGroup" text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: gender text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: "motherTongue" text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: label text COLLATE pg_catalog."default" NOT NULL DEFAULT 'hard'::text,
-- Inherited from table public.sentences: language text COLLATE pg_catalog."default",
CONSTRAINT odia_sentences_language_check CHECK (language = 'Odia'::text)
)
INHERITS (public.sentences)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public.odia_sentences
OWNER to postgres;
-- Table: public.gujarati_sentences
-- DROP TABLE public.gujarati_sentences;
CREATE TABLE IF NOT EXISTS public.gujarati_sentences
(
-- Inherited from table public.sentences: "sentenceId" integer NOT NULL,
-- Inherited from table public.sentences: sentence text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: assign boolean NOT NULL DEFAULT false,
-- Inherited from table public.sentences: "fileName" text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: "userId" text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: "assignDate" date,
-- Inherited from table public.sentences: "userName" text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: "ageGroup" text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: gender text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: "motherTongue" text COLLATE pg_catalog."default",
-- Inherited from table public.sentences: label text COLLATE pg_catalog."default" NOT NULL DEFAULT 'hard'::text,
-- Inherited from table public.sentences: language text COLLATE pg_catalog."default",
CONSTRAINT gujarati_sentences_language_check CHECK (language = 'Gujarati'::text)
)
INHERITS (public.sentences)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public.gujarati_sentences
OWNER to postgres; |
<filename>db/mariadb/raw.sql
CREATE TABLE IF NOT EXISTS raw_mac (
registry VARCHAR(16) DEFAULT NULL,
assignment VARCHAR(12) NOT NULL PRIMARY KEY,
organization VARCHAR(256) DEFAULT NULL,
address VARCHAR(256) DEFAULT NULL) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_tenancy_tenantgroup (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
parent_id BIGINT DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
level INT NOT NULL DEFAULT 0,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_tenancy_tenant (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
group_id BIGINT DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
comments TEXT DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_sitegroup (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
parent_id BIGINT DEFAULT NULL,
level INT NOT NULL DEFAULT 0,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_region (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
parent_id BIGINT DEFAULT NULL,
level INT NOT NULL DEFAULT 0,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_site (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
status VARCHAR(50) DEFAULT NULL,
region_id BIGINT DEFAULT NULL,
group_id BIGINT DEFAULT NULL,
tenant_id BIGINT DEFAULT NULL,
facility VARCHAR(50) DEFAULT NULL,
time_zone VARCHAR(63) DEFAULT NULL,
physical_address VARCHAR(200) DEFAULT NULL,
shipping_address VARCHAR(200) DEFAULT NULL,
latitude NUMERIC(8,6) DEFAULT NULL,
longitude NUMERIC(9,6) DEFAULT NULL,
contact_name VARCHAR(50) DEFAULT NULL,
contact_phone VARCHAR(20) DEFAULT NULL,
contact_email VARCHAR(254) DEFAULT NULL,
comments TEXT DEFAULT NULL,
asn BIGINT DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_location (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
site_id BIGINT DEFAULT NULL,
parent_id BIGINT DEFAULT NULL,
level INT NOT NULL DEFAULT 0,
tenant_id BIGINT DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_rackrole (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
color VARCHAR(6) DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_rack (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
facility_id VARCHAR(50) DEFAULT NULL,
site_id BIGINT DEFAULT NULL,
location_id BIGINT DEFAULT NULL,
tenant_id BIGINT DEFAULT NULL,
status VARCHAR(50) DEFAULT NULL,
role_id BIGINT DEFAULT NULL,
type VARCHAR(50) DEFAULT NULL,
serial VARCHAR(50) DEFAULT NULL,
asset_tag VARCHAR(50) DEFAULT NULL,
width SMALLINT DEFAULT NULL,
u_height SMALLINT DEFAULT NULL,
desc_units BOOLEAN DEFAULT NULL,
comments TEXT DEFAULT NULL,
outer_width SMALLINT DEFAULT NULL,
outer_depth SMALLINT DEFAULT NULL,
outer_unit VARCHAR(50) DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_manufacturer (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_devicerole (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
color VARCHAR(6) DEFAULT NULL,
vm_role BOOLEAN DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_platform (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
manufacturer_id BIGINT DEFAULT NULL,
napalm_driver VARCHAR(50) DEFAULT NULL,
napalm_args VARCHAR(1024) DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_devicetype (
id BIGINT NOT NULL PRIMARY KEY,
slug VARCHAR(100) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
manufacturer_id BIGINT DEFAULT NULL,
model VARCHAR(100) DEFAULT NULL,
part_number VARCHAR(50) DEFAULT NULL,
u_height SMALLINT DEFAULT NULL,
is_full_depth BOOLEAN DEFAULT NULL,
subdevice_role VARCHAR(50) DEFAULT NULL,
airflow VARCHAR(50) DEFAULT NULL,
front_image VARCHAR(100) DEFAULT NULL,
rear_image VARCHAR(100) DEFAULT NULL,
comments TEXT DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_virtualchassis (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
domain VARCHAR(30) DEFAULT NULL,
master_id BIGINT DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_device (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
device_type_id BIGINT DEFAULT NULL,
device_role_id BIGINT DEFAULT NULL,
tenant_id BIGINT DEFAULT NULL,
platform_id BIGINT DEFAULT NULL,
serial VARCHAR(50) DEFAULT NULL,
asset_tag VARCHAR(50) DEFAULT NULL,
site_id BIGINT DEFAULT NULL,
location_id BIGINT DEFAULT NULL,
rack_id BIGINT DEFAULT NULL,
position SMALLINT DEFAULT NULL,
face VARCHAR(100) DEFAULT NULL,
parent_device_id BIGINT DEFAULT NULL,
status VARCHAR(50) DEFAULT NULL,
primary_ip VARCHAR(43) DEFAULT NULL,
primary_ip4_id BIGINT DEFAULT NULL,
primary_ip6_id BIGINT DEFAULT NULL,
cluster_id BIGINT DEFAULT NULL,
virtual_chassis_id BIGINT DEFAULT NULL,
vc_position SMALLINT DEFAULT NULL,
vc_priority SMALLINT DEFAULT NULL,
comments TEXT DEFAULT NULL,
local_context_data VARCHAR(1024) DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_dcim_interface (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(64) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
device_id BIGINT DEFAULT NULL,
type VARCHAR(50) DEFAULT NULL,
enabled BOOLEAN DEFAULT NULL,
parent_id BIGINT DEFAULT NULL,
bridge_id BIGINT DEFAULT NULL,
lag_id BIGINT DEFAULT NULL,
mtu INT DEFAULT NULL,
mac_address VARCHAR(17) DEFAULT NULL,
wwn VARCHAR(23) DEFAULT NULL,
mgmt_only BOOLEAN DEFAULT NULL,
mode VARCHAR(50) DEFAULT NULL,
rf_role VARCHAR(30) DEFAULT NULL,
rf_channel VARCHAR(50) DEFAULT NULL,
rf_channel_frequency NUMERIC(7,2) DEFAULT NULL,
rf_channel_width NUMERIC(7,3) DEFAULT NULL,
tx_power SMALLINT DEFAULT NULL,
untagged_vlan_id BIGINT DEFAULT NULL,
mark_connected BOOLEAN DEFAULT NULL,
label VARCHAR(64) DEFAULT NULL,
cable_id BIGINT DEFAULT NULL,
wireless_link_id BIGINT DEFAULT NULL,
link_peer VARCHAR(100) DEFAULT NULL,
link_peer_type INT DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_ipam_vrf (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
rd VARCHAR(21) DEFAULT NULL,
tenant_id BIGINT DEFAULT NULL,
enforce_unique BOOLEAN DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_ipam_role (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
weight SMALLINT DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_ipam_vlangroup (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
scope_type VARCHAR(100) DEFAULT NULL,
scope_id BIGINT DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_ipam_vlan (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(100) DEFAULT NULL,
slug VARCHAR(100) DEFAULT NULL,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
site_id BIGINT DEFAULT NULL,
group_id BIGINT DEFAULT NULL,
vid SMALLINT DEFAULT NULL,
tenant_id BIGINT DEFAULT NULL,
status VARCHAR(50) DEFAULT NULL,
role_id BIGINT DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_ipam_prefix (
id BIGINT NOT NULL PRIMARY KEY,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
family VARCHAR(50) DEFAULT NULL,
prefix VARCHAR(43) DEFAULT NULL,
site_id BIGINT DEFAULT NULL,
vrf_id BIGINT DEFAULT NULL,
tenant_id BIGINT DEFAULT NULL,
vlan_id BIGINT DEFAULT NULL,
status VARCHAR(50) DEFAULT NULL,
role_id BIGINT DEFAULT NULL,
is_pool BOOLEAN DEFAULT NULL,
mark_utilized BOOLEAN DEFAULT NULL,
level INT NOT NULL DEFAULT 0,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_ipam_iprange (
id BIGINT NOT NULL PRIMARY KEY,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
family VARCHAR(50) DEFAULT NULL,
start_address VARCHAR(43) DEFAULT NULL,
end_address VARCHAR(43) DEFAULT NULL,
size INT DEFAULT NULL,
vrf_id BIGINT DEFAULT NULL,
tenant_id BIGINT DEFAULT NULL,
status VARCHAR(50) DEFAULT NULL,
role_id BIGINT DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_netbox_ipam_ipaddress (
id BIGINT NOT NULL PRIMARY KEY,
description VARCHAR(200) DEFAULT NULL,
created DATE DEFAULT NULL,
last_updated DATETIME DEFAULT NULL,
family VARCHAR(50) DEFAULT NULL,
address VARCHAR(43) DEFAULT NULL,
vrf_id BIGINT DEFAULT NULL,
tenant_id BIGINT DEFAULT NULL,
status VARCHAR(50) DEFAULT NULL,
role VARCHAR(50) DEFAULT NULL,
assigned_object_type VARCHAR(100) DEFAULT NULL,
assigned_object_id VARCHAR(100) DEFAULT NULL,
assigned_object VARCHAR(100) DEFAULT NULL,
nat_inside_id BIGINT DEFAULT NULL,
nat_outside_id BIGINT DEFAULT NULL,
dns_name VARCHAR(255) DEFAULT NULL,
custom_fields VARCHAR(1024) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_scan_ip (
ipid INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
ip VARCHAR(39) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL UNIQUE,
refid INT UNSIGNED NOT NULL,
sourceid INT UNSIGNED NOT NULL,
KEY refid (refid),
KEY sourceid (sourceid)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_scan_ip_info (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
ipid INT UNSIGNED NOT NULL,
infoid INT UNSIGNED NOT NULL,
value VARCHAR(256) COLLATE utf8mb4_bin NOT NULL,
KEY ipid (ipid),
KEY infoid (infoid)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_scan_arp (
arpid INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
ip VARCHAR(39) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
routerid INT UNSIGNED NOT NULL,
mac VARCHAR(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
KEY ip (ip),
KEY routerid (routerid),
KEY mac (mac)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_scan_dhcp (
dhcpid INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
ip VARCHAR(39) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
routerid INT UNSIGNED NOT NULL,
mac VARCHAR(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
KEY ip (ip),
KEY routerid (routerid),
KEY mac (mac)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_scan_port (
portid INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
type VARCHAR(20) NOT NULL,
port INT UNSIGNED NOT NULL,
ipid INT UNSIGNED NOT NULL,
state VARCHAR(20) NOT NULL,
reason VARCHAR(20) NOT NULL,
KEY type (type),
KEY port (port),
KEY ipid (ipid),
KEY state (state),
KEY reason (reason),
KEY iptypeport (ipid, type, port)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_scan_script (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
portid INT UNSIGNED NOT NULL,
script VARCHAR(100) NOT NULL,
value VARCHAR(16100) NOT NULL,
KEY portid (portid),
KEY script (script)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_scan_service (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
portid INT UNSIGNED NOT NULL,
product VARCHAR(100) DEFAULT NULL,
version VARCHAR(50) DEFAULT NULL,
extrainfo VARCHAR(256) DEFAULT NULL,
conf INT DEFAULT NULL,
cpe VARCHAR(100) DEFAULT NULL,
name VARCHAR(50) DEFAULT NULL,
method VARCHAR(256) DEFAULT NULL,
servicefp VARCHAR(14100) DEFAULT NULL,
KEY portid (portid),
KEY product (product),
KEY cpe (cpe)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_scan_osportused (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
ipid INT UNSIGNED NOT NULL,
state VARCHAR(20) NOT NULL,
proto VARCHAR(20) NOT NULL,
port INT UNSIGNED NOT NULL,
KEY ipid (ipid)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_scan_osmatch (
osmatchid INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
ipid INT UNSIGNED NOT NULL,
name VARCHAR(256) NOT NULL,
accuracy INT UNSIGNED NOT NULL,
line INT DEFAULT NULL,
KEY ipid (ipid),
KEY name (name)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_scan_osclass (
osclassid INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
osmatchid INT UNSIGNED NOT NULL,
type VARCHAR(50) DEFAULT NULL,
vendor VARCHAR(50) DEFAULT NULL,
osfamily VARCHAR(50) DEFAULT NULL,
osgen VARCHAR(20) DEFAULT NULL,
accuracy INT UNSIGNED NOT NULL,
cpe VARCHAR(100) DEFAULT NULL,
KEY osmatchid (osmatchid)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_enplug (
enplugid INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
macaddressethernet VARCHAR(17) DEFAULT NULL,
macaddresswifi VARCHAR(17) DEFAULT NULL,
ipaddress VARCHAR(39) DEFAULT NULL,
internalipaddress VARCHAR(39) DEFAULT NULL,
edu_id VARCHAR(256) DEFAULT NULL,
edu_name VARCHAR(256) DEFAULT NULL,
venue_timezone VARCHAR(100) DEFAULT NULL,
venue_id VARCHAR(256) DEFAULT NULL,
venue_name VARCHAR(256) DEFAULT NULL,
account_id VARCHAR(256) DEFAULT NULL,
account_name VARCHAR(256) DEFAULT NULL,
statuscode VARCHAR(20) DEFAULT NULL,
statusmessage VARCHAR(1024) DEFAULT NULL,
lastplayerheartbeat VARCHAR(100) DEFAULT NULL,
playeruptime INT DEFAULT NULL,
tvstatus VARCHAR(100) DEFAULT NULL,
playerversion VARCHAR(20) DEFAULT NULL,
created DATETIME DEFAULT NULL,
tags VARCHAR(1024) DEFAULT NULL,
KEY venue_id (venue_id),
KEY venue_timezone (venue_timezone),
KEY ipaddress (ipaddress),
KEY statuscode (statuscode)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_activaire (
activaireid INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
_id VARCHAR(256) DEFAULT NULL,
name VARCHAR(256) DEFAULT NULL,
macaddress VARCHAR(17) DEFAULT NULL,
remotevolume INT DEFAULT NULL,
remotevolumemode VARCHAR(10) DEFAULT NULL,
lastonline BIGINT DEFAULT NULL,
isplaying VARCHAR(10) DEFAULT NULL,
makeandmodel VARCHAR(20) DEFAULT NULL,
ethernetmacaddress VARCHAR(17) DEFAULT NULL,
internalipaddress VARCHAR(39) DEFAULT NULL,
publicipaddress VARCHAR(39) DEFAULT NULL,
appversion VARCHAR(20) DEFAULT NULL,
currentsong VARCHAR(256) DEFAULT NULL,
devicestatus VARCHAR(20) DEFAULT NULL,
KEY _id (_id),
KEY publicipaddress (publicipaddress),
KEY internalipaddress (internalipaddress),
KEY devicestatus (devicestatus)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_snmp (
snmpid INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
ipid INT UNSIGNED NOT NULL,
oidid INT UNSIGNED DEFAULT NULL,
oid VARCHAR(256) NOT NULL,
snmp_type VARCHAR(20) NOT NULL,
value VARCHAR(1000) NOT NULL,
value_hex VARCHAR(2000) NOT NULL,
vlan INT UNSIGNED DEFAULT NULL,
KEY ipid (ipid),
KEY oidid (oidid),
KEY oid (oid),
KEY snmp_type (snmp_type),
KEY vlan (vlan)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_ruckussz (
wapid INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
ip VARCHAR(39) DEFAULT NULL,
wlcip VARCHAR(39) DEFAULT NULL,
externalip VARCHAR(39) DEFAULT NULL,
mac VARCHAR(17) DEFAULT NULL,
name VARCHAR(256) DEFAULT NULL,
model VARCHAR(256) DEFAULT NULL,
location VARCHAR(256) DEFAULT NULL,
administrativestate VARCHAR(20) DEFAULT NULL,
countrycode VARCHAR(20) DEFAULT NULL,
configstate VARCHAR(20) DEFAULT NULL,
connectionstate VARCHAR(20) DEFAULT NULL,
registrationstate VARCHAR(20) DEFAULT NULL,
lastseentime BIGINT DEFAULT NULL,
approvedtime BIGINT DEFAULT NULL,
uptime BIGINT DEFAULT NULL,
clientcount INT DEFAULT NULL,
KEY ip (ip),
KEY externalip (externalip),
KEY wlcip (wlcip),
KEY mac (mac),
KEY connectionstate (connectionstate),
KEY lastseentime (lastseentime)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS raw_mist (
mistid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
ip VARCHAR(39) DEFAULT NULL,
ext_ip VARCHAR(39) DEFAULT NULL,
mac VARCHAR(17) DEFAULT NULL,
status VARCHAR(20) DEFAULT NULL,
type VARCHAR(20) DEFAULT NULL,
last_seen BIGINT DEFAULT NULL,
uptime BIGINT DEFAULT NULL,
name VARCHAR(100) DEFAULT NULL,
model VARCHAR(20) DEFAULT NULL,
lldp_stat_chassis_id VARCHAR(17) DEFAULT NULL,
lldp_stat_system_name VARCHAR(100) DEFAULT NULL,
lldp_stat_system_desc VARCHAR(256) DEFAULT NULL,
lldp_stat_port_desc VARCHAR(100) DEFAULT NULL,
lldp_stat_port_id VARCHAR(50) DEFAULT NULL,
KEY ip (ip),
KEY ext_ip (ext_ip),
KEY mac (mac),
KEY status (status),
KEY last_seen (last_seen)
) ENGINE=InnoDB;
|
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name VARCHAR(100)
);
CREATE TABLE tweet (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id),
content VARCHAR(255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE user_follower (
user_id INTEGER REFERENCES users(id),
follower_id INTEGER REFERENCES users(id)
);
|
SELECT * FROM MPRemovalLog WITH (NOLOCK)
ORDER BY MPRemovalDate DESC |
<gh_stars>1-10
PRINT N'Altering [Producer].[Producer]...';
GO
ALTER TABLE [Producer].[Producer]
ALTER COLUMN AnnualTurnover [decimal](28, 12) NOT NULL
GO
PRINT N'Update complete.';
GO
|
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 100119
Source Host : localhost:3306
Source Database : think
Target Server Type : MYSQL
Target Server Version : 100119
File Encoding : 65001
Date: 2017-11-25 16:20:30
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for tp_action_log
-- ----------------------------
DROP TABLE IF EXISTS `tp_action_log`;
CREATE TABLE `tp_action_log` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(10) NOT NULL DEFAULT '0' COMMENT '执行用户id',
`action_ip` bigint(20) NOT NULL COMMENT '执行行为者ip',
`log` longtext NOT NULL COMMENT '日志备注',
`log_url` varchar(255) NOT NULL COMMENT '执行的URL',
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '执行行为的时间',
`username` varchar(255) NOT NULL COMMENT '执行者',
`title` varchar(255) NOT NULL COMMENT '标题',
PRIMARY KEY (`id`),
KEY `id` (`id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='行为日志表';
-- ----------------------------
-- Records of tp_action_log
-- ----------------------------
-- ----------------------------
-- Table structure for tp_admin
-- ----------------------------
DROP TABLE IF EXISTS `tp_admin`;
CREATE TABLE `tp_admin` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '管理员自增ID',
`user_name` varchar(255) DEFAULT NULL COMMENT '用户名',
`user_password` varchar(255) DEFAULT NULL COMMENT '<PASSWORD>',
`user_nicename` varchar(255) DEFAULT NULL COMMENT '管理员的简称',
`user_status` int(11) DEFAULT '1' COMMENT '用户状态 0:禁用; 1:正常 ;',
`user_email` varchar(255) DEFAULT '' COMMENT '邮箱',
`last_login_ip` varchar(16) DEFAULT NULL COMMENT '最后登录ip',
`last_login_time` datetime DEFAULT NULL COMMENT '最后登录时间',
`create_time` datetime DEFAULT NULL COMMENT '注册时间',
`role` varchar(255) DEFAULT NULL COMMENT '角色ID',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COMMENT='后台管理员表';
-- ----------------------------
-- Records of tp_admin
-- ----------------------------
INSERT INTO `tp_admin` VALUES ('1', 'admin', '21232f297a57a5a743894a0e4a801fc3', null, '1', '<EMAIL>', '172.16.31.10', '2016-10-26 12:06:43', '2016-06-07 17:04:05', null);
INSERT INTO `tp_admin` VALUES ('16', 'zou', '21232f297a57a5a743894a0e4a801fc3', null, '1', '<EMAIL>', '127.0.0.1', '2016-07-17 17:01:36', '2016-07-08 15:29:41', '2');
INSERT INTO `tp_admin` VALUES ('23', 'sdasd', '0aa1ea9a5a04b78d4581dd6d17742627', null, '1', '<EMAIL>', null, null, '2016-11-15 16:55:36', '2,3');
INSERT INTO `tp_admin` VALUES ('27', 'tekin', '21232f297a57a5a743894a0e4a801fc3', null, '1', '<EMAIL>', null, null, '2017-01-18 21:14:40', '2');
-- ----------------------------
-- Table structure for tp_auth_access
-- ----------------------------
DROP TABLE IF EXISTS `tp_auth_access`;
CREATE TABLE `tp_auth_access` (
`role_id` mediumint(8) unsigned NOT NULL COMMENT '角色',
`rule_name` varchar(255) NOT NULL COMMENT '规则唯一英文标识,全小写',
`type` varchar(30) DEFAULT NULL COMMENT '权限规则分类,请加应用前缀,如admin_',
`menu_id` int(11) DEFAULT NULL COMMENT '后台菜单ID',
KEY `role_id` (`role_id`),
KEY `rule_name` (`rule_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='权限授权表';
-- ----------------------------
-- Records of tp_auth_access
-- ----------------------------
INSERT INTO `tp_auth_access` VALUES ('2', 'index/auth/default', 'admin_url', '1');
INSERT INTO `tp_auth_access` VALUES ('2', 'index/auth/default', 'admin_url', '8');
INSERT INTO `tp_auth_access` VALUES ('2', 'index/auth/menu', 'admin_url', '9');
INSERT INTO `tp_auth_access` VALUES ('2', 'index/auth/menuadd', 'admin_url', '10');
INSERT INTO `tp_auth_access` VALUES ('2', 'index/auth/menuedit', 'admin_url', '11');
INSERT INTO `tp_auth_access` VALUES ('2', 'index/auth/menudelete', 'admin_url', '12');
INSERT INTO `tp_auth_access` VALUES ('2', 'index/auth/menuorder', 'admin_url', '13');
-- ----------------------------
-- Table structure for tp_auth_role
-- ----------------------------
DROP TABLE IF EXISTS `tp_auth_role`;
CREATE TABLE `tp_auth_role` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL COMMENT '角色名称',
`pid` smallint(6) DEFAULT '0' COMMENT '父角色ID',
`status` tinyint(1) unsigned DEFAULT NULL COMMENT '状态',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`listorder` int(3) NOT NULL DEFAULT '0' COMMENT '排序字段',
PRIMARY KEY (`id`),
KEY `parentId` (`pid`),
KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='角色表';
-- ----------------------------
-- Records of tp_auth_role
-- ----------------------------
INSERT INTO `tp_auth_role` VALUES ('1', '超级管理员', '0', '1', '拥有网站最高管理员权限!', '1329633709', '1329633709', '0');
INSERT INTO `tp_auth_role` VALUES ('2', '文章管理', '0', '1', '', '0', '0', '0');
INSERT INTO `tp_auth_role` VALUES ('3', '网管', '0', '1', '来一小时的', '0', '0', '0');
-- ----------------------------
-- Table structure for tp_auth_role_user
-- ----------------------------
DROP TABLE IF EXISTS `tp_auth_role_user`;
CREATE TABLE `tp_auth_role_user` (
`role_id` int(11) unsigned DEFAULT '0' COMMENT '角色 id',
`user_id` int(11) DEFAULT '0' COMMENT '用户id',
KEY `group_id` (`role_id`),
KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='用户角色对应表';
-- ----------------------------
-- Records of tp_auth_role_user
-- ----------------------------
INSERT INTO `tp_auth_role_user` VALUES ('2', '16');
-- ----------------------------
-- Table structure for tp_auth_rule
-- ----------------------------
DROP TABLE IF EXISTS `tp_auth_rule`;
CREATE TABLE `tp_auth_rule` (
`menu_id` int(11) NOT NULL COMMENT '后台菜单 ID',
`module` varchar(20) NOT NULL COMMENT '规则所属module',
`type` varchar(30) NOT NULL DEFAULT '1' COMMENT '权限规则分类,请加应用前缀,如admin_',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '规则唯一英文标识,全小写',
`url_param` varchar(255) DEFAULT NULL COMMENT '额外url参数',
`title` varchar(20) NOT NULL DEFAULT '' COMMENT '规则中文描述',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否有效(0:无效,1:有效)',
`rule_param` varchar(300) NOT NULL DEFAULT '' COMMENT '规则附加条件',
`nav_id` int(11) DEFAULT '0' COMMENT 'nav id',
PRIMARY KEY (`menu_id`),
KEY `module` (`module`,`status`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='权限规则表';
-- ----------------------------
-- Records of tp_auth_rule
-- ----------------------------
INSERT INTO `tp_auth_rule` VALUES ('2', 'index', 'admin_url', 'index/auth/default', '', '权限管理', '1', '', '0');
INSERT INTO `tp_auth_rule` VALUES ('3', 'index', 'admin_url', 'index/auth/role', '', '角色管理', '1', '', '0');
INSERT INTO `tp_auth_rule` VALUES ('4', 'index', 'admin_url', 'index/auth/roleadd', '', '角色增加', '1', '', '0');
INSERT INTO `tp_auth_rule` VALUES ('5', 'index', 'admin_url', 'index/auth/roleedit', '', '角色编辑', '1', '', '0');
INSERT INTO `tp_auth_rule` VALUES ('6', 'index', 'admin_url', 'index/auth/roledelete', '', '角色删除', '1', '', '0');
INSERT INTO `tp_auth_rule` VALUES ('7', 'index', 'admin_url', 'index/auth/authorize', '', '角色授权', '1', '', '0');
INSERT INTO `tp_auth_rule` VALUES ('8', 'index', 'admin_url', 'index/auth/menu', '', '菜单管理', '1', '', '0');
INSERT INTO `tp_auth_rule` VALUES ('9', 'index', 'admin_url', 'index/auth/menu', '', '菜单列表', '1', '', '0');
INSERT INTO `tp_auth_rule` VALUES ('10', 'index', 'admin_url', 'index/auth/menuadd', '', '菜单增加', '1', '', '0');
INSERT INTO `tp_auth_rule` VALUES ('11', 'index', 'admin_url', 'index/auth/menuedit', '', '菜单修改', '1', '', '0');
INSERT INTO `tp_auth_rule` VALUES ('12', 'index', 'admin_url', 'index/auth/menudelete', '', '菜单删除', '1', '', '0');
INSERT INTO `tp_auth_rule` VALUES ('13', 'index', 'admin_url', 'index/auth/menuorder', '', '菜单排序', '1', '', '0');
INSERT INTO `tp_auth_rule` VALUES ('14', 'index', 'admin_url', 'index/admin/index', '', '用户管理', '1', '', '0');
-- ----------------------------
-- Table structure for tp_menu
-- ----------------------------
DROP TABLE IF EXISTS `tp_menu`;
CREATE TABLE `tp_menu` (
`id` smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`parent_id` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '父级ID',
`app` char(20) NOT NULL COMMENT '应用名称app',
`model` char(20) NOT NULL COMMENT '控制器',
`action` char(20) NOT NULL COMMENT '操作名称',
`url_param` char(50) NOT NULL COMMENT 'url参数',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '菜单类型 1:权限认证+菜单;0:只作为菜单',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态,1显示,0不显示',
`name` varchar(50) NOT NULL COMMENT '菜单名称',
`icon` varchar(50) NOT NULL COMMENT '菜单图标',
`remark` varchar(255) NOT NULL COMMENT '备注',
`list_order` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '排序ID',
`rule_param` varchar(255) NOT NULL COMMENT '验证规则',
`nav_id` int(11) DEFAULT '0' COMMENT 'nav ID ',
`request` varchar(255) NOT NULL COMMENT '请求方式(日志生成)',
`log_rule` varchar(255) NOT NULL COMMENT '日志规则',
PRIMARY KEY (`id`),
KEY `status` (`status`),
KEY `model` (`model`),
KEY `parent_id` (`parent_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='后台菜单表';
-- ----------------------------
-- Records of tp_menu
-- ----------------------------
INSERT INTO `tp_menu` VALUES ('1', '0', 'index', 'auth', 'default', '', '0', '1', '系统管理', '', '', '10', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('2', '1', 'index', 'auth', 'default', '', '0', '1', '权限管理', '', '', '0', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('3', '2', 'index', 'auth', 'role', '', '1', '1', '角色管理', '', '', '0', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('4', '3', 'index', 'auth', 'roleAdd', '', '1', '0', '角色增加', '', '', '0', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('5', '3', 'index', 'auth', 'roleEdit', '', '1', '0', '角色编辑', '', '', '0', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('6', '3', 'index', 'auth', 'roleDelete', '', '1', '0', '角色删除', '', '', '0', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('7', '3', 'index', 'auth', 'authorize', '', '1', '0', '角色授权', '', '', '0', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('8', '1', 'index', 'auth', 'default', '', '0', '1', '菜单管理', '', '', '0', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('9', '8', 'index', 'auth', 'menu', '', '1', '1', '菜单列表', '', '', '0', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('10', '9', 'index', 'auth', 'menuAdd', '', '1', '0', '菜单增加', '', '', '0', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('11', '9', 'index', 'auth', 'menuEdit', '', '1', '0', '菜单修改', '', '', '0', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('12', '9', 'index', 'auth', 'menuDelete', '', '1', '0', '菜单删除', '', '', '0', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('13', '9', 'index', 'auth', 'menuOrder', '', '1', '0', '菜单排序', '', '', '0', '', '0', '', '');
INSERT INTO `tp_menu` VALUES ('14', '2', 'index', 'admin', 'index', '', '1', '1', '用户管理', '', '', '0', '', '0', '', '');
|
<filename>gesitko2_tracking.sql
-- phpMyAdmin SQL Dump
-- version 4.0.10.18
-- https://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Feb 20, 2017 at 11:12 AM
-- Server version: 5.6.33-cll-lve
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `gesitko2_tracking`
--
-- --------------------------------------------------------
--
-- Table structure for table `cf_config`
--
CREATE TABLE IF NOT EXISTS `cf_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`phone` varchar(50) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL,
`fb` varchar(50) DEFAULT NULL,
`tw` varchar(50) DEFAULT NULL,
`ig` varchar(50) DEFAULT NULL,
`send_mail` text,
`alamat` text NOT NULL,
`nama` varchar(50) NOT NULL,
`bbm` varchar(20) NOT NULL,
`text_isi` text NOT NULL,
`txt_success_order` text,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=2 ;
--
-- Dumping data for table `cf_config`
--
INSERT INTO `cf_config` (`id`, `phone`, `email`, `fb`, `tw`, `ig`, `send_mail`, `alamat`, `nama`, `bbm`, `text_isi`, `txt_success_order`) VALUES
(1, '085314345345', 'order<EMAIL>', 'https://facebook.com/gesitkonveksi', 'https://twitter.com/gesitkonveksi', 'https://instagram.com/gesitkonveksi', '<p><img alt="" src="http://tracking.gesitkonveksi.co.id/Logo-Gesit.png" /></p>\r\n\r\n<p><strong>CV. NUANSA SANGGAR PRATAMA<br />\r\nGesit Konveksi</strong></p>\r\n\r\n<hr />\r\n<p>Berikut No. Resi pesanan anda<br />\r\nNo. Resi : {noresi}</p>\r\n\r\n<hr />\r\n<p><strong>Call Centre</strong><br />\r\nTelepon : 022 54419899</p>\r\n\r\n<p>Tlp/SMS/WA : 085314 345 345 </p>\r\n\r\n<p>Tlp/SMS/WA : 085222213999</p>\r\n\r\n<p>Pin BB : D31BB2C6<br />\r\nEmail : <EMAIL><br />\r\nWorkshop : Ruko Linggahara D11 Jalan Sadang-TKI Margahayu Tengah Kopo Bandung Jawabarat</p>\r\n', 'Komplek Sukamenak Indah RE 20 Kopo Bandung', 'Gesit Konveksi', 'qaz1234', '<p>CV. NUANSA SANGGAR PRATAMA<br />\r\nGesit Konveksi<br />\r\n<br />\r\n<strong>Call Centre</strong></p>\r\n\r\n<p>Telepon : 022 54419899</p>\r\n\r\n<p>Tlp/SMS/WA : 085314 345 345 </p>\r\n\r\n<p>Tlp/SMS/WA : 085222213999</p>\r\n\r\n<p>Pin BB : D31BB2C6<br />\r\nEmail : <EMAIL><br />\r\nWorkshop :Ruko Linggahara D11 Jalan Sadang TKI Kopo Bandung Jawabarat</p>\r\n', '<p>Data pesanan anda telah kami simpan, cek email anda untuk melihat pesanan.</p>\r\n\r\n<p>No. Resi Anda : <strong><span style="color:#FF0000">{NORESI}</span></strong></p>\r\n');
-- --------------------------------------------------------
--
-- Table structure for table `ss_authtoken`
--
CREATE TABLE IF NOT EXISTS `ss_authtoken` (
`id` int(11) NOT NULL,
`resi` varchar(20) DEFAULT NULL,
`auth_token` varchar(20) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`active` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0;
-- --------------------------------------------------------
--
-- Table structure for table `ss_category`
--
CREATE TABLE IF NOT EXISTS `ss_category` (
`categorycode` int(11) NOT NULL AUTO_INCREMENT,
`categoryname` varchar(50) NOT NULL,
`parent` int(11) NOT NULL DEFAULT '0',
`createdby` varchar(30) DEFAULT NULL,
`createddate` date DEFAULT NULL,
`updatedby` varchar(30) DEFAULT NULL,
`updateddate` date DEFAULT NULL,
PRIMARY KEY (`categorycode`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=6 ;
--
-- Dumping data for table `ss_category`
--
INSERT INTO `ss_category` (`categorycode`, `categoryname`, `parent`, `createdby`, `createddate`, `updatedby`, `updateddate`) VALUES
(1, 'Topi', 0, 'ADMIN', '2016-04-13', 'ADMIN', '2016-10-18'),
(2, 'Kaos', 0, 'ADMIN', '2016-04-13', 'ADMIN', '2016-10-18'),
(3, 'Kemeja', 0, 'ADMIN', '2016-04-13', 'ADMIN', '2016-10-18'),
(4, 'Rompi', 0, NULL, NULL, NULL, NULL),
(5, '<NAME>', 0, NULL, NULL, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `ss_parameter`
--
CREATE TABLE IF NOT EXISTS `ss_parameter` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`parametercode` varchar(20) DEFAULT NULL,
`description` tinytext,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `ss_parameter`
--
INSERT INTO `ss_parameter` (`id`, `parametercode`, `description`) VALUES
(1, 'PROSES', 'Langkah-langkah proses pengerjaan');
-- --------------------------------------------------------
--
-- Table structure for table `ss_parametervalue`
--
CREATE TABLE IF NOT EXISTS `ss_parametervalue` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`parametercode` int(11) DEFAULT NULL,
`parametervaluecode` varchar(40) DEFAULT NULL,
`parametervalue` text,
`option` varchar(30) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `parametercode` (`parametercode`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 AUTO_INCREMENT=8 ;
--
-- Dumping data for table `ss_parametervalue`
--
INSERT INTO `ss_parametervalue` (`id`, `parametercode`, `parametervaluecode`, `parametervalue`, `option`) VALUES
(1, 1, '1', 'Survei & Beli Bahan', 'fa fa-search'),
(2, 1, '2', 'Cutting', 'fa fa-cut'),
(3, 1, '3', 'Aplikasi', 'fa fa-cogs'),
(4, 1, '4', 'Jait', 'fa fa-gear'),
(5, 1, '5', 'QC, Packing', 'fa fa-archive'),
(6, 1, '6', 'Distribusi', 'fa fa-truck'),
(7, 1, '7', 'Perbaikan', 'fa fa-recycle');
-- --------------------------------------------------------
--
-- Table structure for table `ss_products`
--
CREATE TABLE IF NOT EXISTS `ss_products` (
`productcode` varchar(15) NOT NULL,
`productname` varchar(30) NOT NULL,
`categorycode` int(11) NOT NULL,
`suppliercode` varchar(15) NOT NULL,
`stock` int(11) NOT NULL,
`price` double NOT NULL,
`sale` double NOT NULL,
`photo` varchar(50) DEFAULT NULL,
`description` text NOT NULL,
`createdby` varchar(30) DEFAULT NULL,
`createddate` date DEFAULT NULL,
`updatedby` varchar(30) DEFAULT NULL,
`updateddate` date DEFAULT NULL,
PRIMARY KEY (`productcode`) USING BTREE,
KEY `categorycode` (`categorycode`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
-- --------------------------------------------------------
--
-- Table structure for table `ss_user`
--
CREATE TABLE IF NOT EXISTS `ss_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) DEFAULT NULL,
`password` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `ss_user`
--
INSERT INTO `ss_user` (`id`, `username`, `password`) VALUES
(1, 'gesit', '*C142FB215B6E05B7C134B1A653AD4B455157FD79');
-- --------------------------------------------------------
--
-- Table structure for table `um_customer`
--
CREATE TABLE IF NOT EXISTS `um_customer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`customercode` varchar(15) NOT NULL,
`customername` varchar(50) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`city` varchar(50) DEFAULT NULL,
`postalcode` varchar(20) DEFAULT NULL,
`phone` varchar(30) DEFAULT NULL,
`fax` varchar(30) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL,
`remarks` varchar(255) DEFAULT NULL,
`datecreated` date NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
KEY `customercode` (`customercode`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `um_order`
--
CREATE TABLE IF NOT EXISTS `um_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`customercode` varchar(20) DEFAULT NULL,
`nama` varchar(50) DEFAULT NULL,
`alamat` varchar(150) DEFAULT NULL,
`email` varchar(30) DEFAULT NULL,
`telp` varchar(35) DEFAULT NULL,
`lembaga` varchar(50) DEFAULT NULL,
`jenis` varchar(15) DEFAULT NULL,
`jumlah` int(11) DEFAULT NULL,
`catatan` text,
`total` double DEFAULT NULL,
`deadline` date DEFAULT NULL,
`wa` varchar(50) DEFAULT NULL,
`bbm` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `productcode` (`jenis`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 AUTO_INCREMENT=26 ;
--
-- Dumping data for table `um_order`
--
INSERT INTO `um_order` (`id`, `customercode`, `nama`, `alamat`, `email`, `telp`, `lembaga`, `jenis`, `jumlah`, `catatan`, `total`, `deadline`, `wa`, `bbm`) VALUES
(21, 'CUS-270117-9P2F4', '<NAME>', 'Komplek Girimekar Permai Jl. Girimekar Indah III No. 77 RT 01 RW 20 Desa Girimekar Kec. Cilengkrang', '<EMAIL>', '082321807000', 'Lewos', '2', 85, 'Warna coklat tua seperti katalog Kenari no. 9\r\nPanjang 2 XL\r\nSisanya pendek \r\nM 16, L 43, XL 21, XXL 3\r\nDesain sudah dikirim ke email', NULL, '2017-02-03', '082321807000', ''),
(18, 'CUS-260117-U5X5H', '<NAME>', 'Jl. Garuda VI No. 04 RT.03 RW. XXV, Kel Palangkaraya, Kec Jekan Raya, Kota Palangkaraya, Kode Pos 73112 ', '<EMAIL>', '081347707067 / (0536) 3242116 / 324', 'PT. Kasongan Bumi Kencana (KBK)', '2', 50, 'Kaos Bulan K3, Jenis Polo T-Shirt Lacoste 20s, Combi 3 Warna (Hijau Tua, Abu Terang, Putih) as design, size Laki (XXL2, XL11, L25, M5) Perempuan(XL1, L2, M4). Total: 43 (Laki2) + 7 (Perempuan) = 50 Kaos', NULL, '2017-02-07', '081347707048 / Karlina Tristyaningsih', 'D00C5771'),
(23, 'CUS-280117-YWFX4', '<NAME>', 'Cafe frontera jl cut meutia no 81 margahayu bekasi timur', '<EMAIL>', '081291995459', 'Cafe', '2', 50, 'Model poloshirt\r\nBahan lacoste pe\r\nWarna putih 25pcs\r\nWarna hitam 25pcs', NULL, '2017-02-10', '081291995459', ''),
(24, 'CUS-300117-DH0Q0', '<NAME>', 'Taman Cibaduyut IndahE196 Bandung 40239', '<EMAIL>', '0818641117', 'JPKP JABAR', '3', 100, 'DESAIN DI EMAIL', NULL, '2017-02-17', '081224641117', ''),
(25, 'CUS-300117-TY7Z', 'Nuryati (PT. Techno Prefab Indonesia)', 'JL. Techno I Block C3F Techno Park Industrial Estate, Kawasan Jababeka 3, Pasir Gombong, Cikarang Utara 17530', '<EMAIL>', '085883388017', 'PT. TECHNO PREFAB INDONESIA', '2', 100, 'Logo dibelakang kaos diselesaikan belakangan, karena masih tunggu info sponsor.', NULL, '2017-02-10', '085883388017', '545F34B3');
-- --------------------------------------------------------
--
-- Table structure for table `um_progress`
--
CREATE TABLE IF NOT EXISTS `um_progress` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`noresi` varchar(20) NOT NULL,
`progress` int(11) DEFAULT NULL,
`statusdate` date NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=69 ;
--
-- Dumping data for table `um_progress`
--
INSERT INTO `um_progress` (`id`, `noresi`, `progress`, `statusdate`) VALUES
(1, '0AF761YP', 1, '2016-10-31'),
(2, 'R31FBVF9', 1, '2016-11-03'),
(3, 'R31FBVF9', 2, '2016-11-03'),
(4, 'G3M240S2', 1, '2016-11-07'),
(5, 'G3M240S2', 2, '2016-11-07'),
(6, 'FD8JL3JX', 1, '2016-11-07'),
(7, 'FD8JL3JX', 2, '2016-11-07'),
(8, 'FD8JL3JX', 6, '2016-11-07'),
(9, '1IZ2W4NR', 1, '2017-01-23'),
(10, 'ATYHY4JR', 5, '2016-11-07'),
(11, 'ATYHY4JR', 4, '2016-11-07'),
(47, 'H1W2GDH4', 1, '2017-01-27'),
(13, 'ATYHY4JR', 6, '2016-11-11'),
(14, 'H48QKS38', 1, '2016-11-12'),
(15, 'H48QKS38', 2, '2016-11-12'),
(16, 'H48QKS38', 3, '2016-11-12'),
(17, 'H48QKS38', 4, '2016-11-12'),
(18, 'JY7DSJA', 1, '2016-12-06'),
(19, 'JY7DSJA', 2, '2016-12-07'),
(32, 'GO633CTF', 4, '2016-12-27'),
(24, 'GO633CTF', 1, '2016-12-23'),
(31, 'GO633CTF', 3, '2016-12-26'),
(30, 'GO633CTF', 2, '2016-12-24'),
(28, '0AF761YP', 2, '2016-12-29'),
(33, 'GO633CTF', 5, '2016-12-29'),
(34, 'GO633CTF', 6, '2016-12-31'),
(35, '0AF761YP', 3, '2016-12-23'),
(36, '0AF761YP', 4, '2016-12-29'),
(45, 'LDP39CQ', 1, '2017-01-16'),
(43, 'OR9JOY5G', 1, '2017-01-02'),
(42, '0AF761YP', 5, '2016-12-29'),
(46, 'LDP39CQ', 2, '2017-01-16'),
(48, 'XFGFKUXV', 1, '2017-01-30'),
(49, 'VXOCW84L', 1, '2017-01-31'),
(50, 'Z3VEROXR', 1, '2017-02-01'),
(51, 'H1W2GDH4', 2, '2017-02-02'),
(52, 'XFGFKUXV', 2, '2017-02-01'),
(53, 'VXOCW84L', 2, '2017-02-01'),
(54, 'VXOCW84L', 3, '2017-02-01'),
(55, 'XFGFKUXV', 3, '2017-02-01'),
(56, 'Z3VEROXR', 2, '2017-02-02'),
(57, 'XFGFKUXV', 4, '2017-02-02'),
(58, 'Z3VEROXR', 3, '2017-02-11'),
(59, 'XFGFKUXV', 5, '2017-02-04'),
(60, 'VXOCW84L', 4, '2017-02-04'),
(61, 'H1W2GDH4', 3, '2017-02-04'),
(62, 'XFGFKUXV', 6, '2017-02-06'),
(63, 'VXOCW84L', 5, '2017-02-09'),
(64, 'H1W2GDH4', 4, '2017-02-08'),
(65, 'H1W2GDH4', 6, '2017-02-11'),
(66, 'VXOCW84L', 6, '2017-02-11'),
(67, 'Z3VEROXR', 5, '2017-02-14'),
(68, 'Z3VEROXR', 6, '2017-02-18');
-- --------------------------------------------------------
--
-- Table structure for table `um_tracking`
--
CREATE TABLE IF NOT EXISTS `um_tracking` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`noresi` varchar(20) NOT NULL,
`transactioncode` varchar(15) NOT NULL,
`progress` int(11) NOT NULL,
`customercode` varchar(20) DEFAULT NULL,
`createddate` date DEFAULT NULL,
`status` tinyint(1) DEFAULT '0',
`statusdate` date DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `transactioncode` (`transactioncode`),
KEY `customercode` (`customercode`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 AUTO_INCREMENT=26 ;
--
-- Dumping data for table `um_tracking`
--
INSERT INTO `um_tracking` (`id`, `noresi`, `transactioncode`, `progress`, `customercode`, `createddate`, `status`, `statusdate`) VALUES
(24, '2PSXOCDL', '{1234}', 0, 'CUS-300117-DH0Q0', '2017-01-30', 0, NULL),
(25, 'Z3VEROXR', '{1234}', 6, 'CUS-300117-TY7Z', '2017-01-30', 0, '2017-02-16'),
(21, 'XFGFKUXV', '{1234}', 6, 'CUS-270117-9P2F4', '2017-01-27', 0, '2017-02-04'),
(18, 'H1W2GDH4', '{1234}', 6, 'CUS-260117-U5X5H', '2017-01-26', 0, '2017-02-09'),
(23, 'VXOCW84L', '{1234}', 6, 'CUS-280117-YWFX4', '2017-01-28', 0, '2017-02-11');
--
-- Triggers `um_tracking`
--
DROP TRIGGER IF EXISTS `trigger_progress`;
DELIMITER //
CREATE TRIGGER `trigger_progress` AFTER UPDATE ON `um_tracking`
FOR EACH ROW BEGIN
DECLARE counts INTEGER;
IF NEW.progress > 0 THEN
SELECT COUNT(*)
INTO counts
FROM `um_progress`
WHERE noresi = NEW.noresi
AND progress = NEW.progress;
IF counts < 1 THEN
INSERT INTO `um_progress`
VALUES(NULL, NEW.noresi, NEW.progress, CURRENT_DATE());
ELSE
DELETE FROM `um_progress` WHERE noresi = NEW.noresi AND progress > NEW.progress;
UPDATE `um_progress`
SET progress = NEW.progress,
statusdate = NEW.statusdate
WHERE noresi = NEW.noresi
AND progress = NEW.progress;
END IF;
END IF;
END
//
DELIMITER ;
-- --------------------------------------------------------
--
-- Table structure for table `um_transaction`
--
CREATE TABLE IF NOT EXISTS `um_transaction` (
`transactioncode` varchar(15) NOT NULL,
`date` datetime NOT NULL,
`description` text NOT NULL,
`payment` int(11) NOT NULL,
`createdby` varchar(30) DEFAULT NULL,
`createddate` date DEFAULT NULL,
`updatedby` varchar(30) DEFAULT NULL,
`updateddate` date DEFAULT NULL,
PRIMARY KEY (`transactioncode`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
-- --------------------------------------------------------
--
-- Table structure for table `um_transactiondetails`
--
CREATE TABLE IF NOT EXISTS `um_transactiondetails` (
`transactioncode` varchar(15) NOT NULL,
`productcode` varchar(15) NOT NULL,
`qty` int(11) NOT NULL,
`status` int(11) NOT NULL,
`createdby` varchar(30) DEFAULT NULL,
`createddate` date DEFAULT NULL,
`updatedby` varchar(30) DEFAULT NULL,
`updateddate` date DEFAULT NULL,
KEY `um_transactiondetails_fk1` (`transactioncode`),
KEY `productcode` (`productcode`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*
* CREATE DATABASE `mysqlldb_blocks` CHARACTER SET utf8;
*/
-- blocks
drop table if exists `blocks`;
create table `blocks` (
`id` int(11) not null auto_increment,
`network` int(11) not null,
`block_len` int(11) not null,
`checksum` varchar(8) character set utf8 not null default '',
`raw_bytes` mediumblob not null,
`hash` varchar(64) character set utf8 not null default '',
`height` int(11) not null default 0,
`block_time` timestamp not null default current_timestamp,
`created` timestamp not null default current_timestamp,
`updated` timestamp not null default current_timestamp on update current_timestamp,
primary key (`id`),
index idx_blocks_01 (`hash`),
index idx_blocks_02 (`height`)
) engine=innodb default character set utf8;
-- transaction_outputs
drop table if exists `transaction_outputs`;
create table `transaction_outputs` (
`id` int(11) not null auto_increment,
`block_id` int(11) not null,
`transaction_id` varchar(64) character set utf8 not null default '',
`amount` bigint not null,
`pk_script_bytes` mediumblob not null,
`pk_script_class` tinyint unsigned not null,
`created` timestamp not null default current_timestamp,
`updated` timestamp not null default current_timestamp on update current_timestamp,
primary key (`id`),
index idx_transaction_outputs_01 (`block_id`),
index idx_transaction_outputs_02 (`transaction_id`)
) engine=innodb default character set utf8;
-- transaction_output_addresses
drop table if exists `transaction_output_addresses`;
create table `transaction_output_addresses` (
`id` int(11) not null auto_increment,
`block_id` int(11) not null,
`tx_out_id` int(11) not null,
`address` varchar(255) character set utf8 not null default '',
`created` timestamp not null default current_timestamp,
`updated` timestamp not null default current_timestamp on update current_timestamp,
primary key (`id`),
index idx_transaction_output_addresses_01 (`address`)
) engine=innodb default character set utf8;
|
USE Chinook;
-- MySQL
-- DROP TABLE CustomerDocument
-- TRUNCATE TABLE CustomerDocument
CREATE TABLE CustomerDocument
(
CustomerDocumentId integer AUTO_INCREMENT NOT NULL,
CustomerId integer NOT NULL,
Description varchar(100) NOT NULL,
FileName varchar(100) NOT NULL,
FileAcronym varchar(10) NOT NULL, -- docx | xlsx | pdf | ...
PRIMARY KEY (CustomerDocumentId)
);
ALTER TABLE CustomerDocument ADD CONSTRAINT FK_CustomerDocument_01
FOREIGN KEY(CustomerId) REFERENCES Customer(CustomerId) ON UPDATE CASCADE;
CREATE INDEX IX_CustomerDocument_01 ON CustomerDocument(CustomerId);
CREATE INDEX IX_CustomerDocument_02 ON CustomerDocument(FileName);
CREATE INDEX IX_CustomerDocument_03 ON CustomerDocument(FileAcronym);
/*
INSERT INTO CustomerDocument VALUES (1, 'Excel', 'xlsx');
INSERT INTO CustomerDocument VALUES (1, 'PDF', 'pdf');
INSERT INTO CustomerDocument VALUES (1, 'Word', 'docx');
*/ |
<reponame>France-ioi/algorea-backend<gh_stars>0
-- +migrate Up
ALTER TABLE `groups_attempts` DROP INDEX idGroup;
ALTER TABLE `groups_attempts` ADD INDEX GroupItemMinusScoreBestAnswerDateID (idGroup, idItem, iMinusScore, sBestAnswerDate);
-- +migrate Down
ALTER TABLE `groups_attempts` DROP INDEX GroupItemMinusScoreBestAnswerDateID;
ALTER TABLE `groups_attempts` ADD INDEX idGroup (idGroup);
|
DROP VIEW IF EXISTS user_view CASCADE; |
<reponame>Airat-asd/2020-03-otus-java-Zagretdinov-maven
insert into tUsers values ('login2', 'name2', 12345, 'n'); |
--DB FILE FILLAGE
SELECT name
, size/128 AS TotalSizeMB
, CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128 as UsedMb
, size/128 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128 AS AvailableMB
, CONVERT(decimal(10,2) , (CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128) / (size/128.0) * 100) as UsedPc
FROM sys.database_files
ORDER BY CONVERT(decimal(10,2) , (CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128) / (size/128.0) * 100) DESC
|
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: gbibliotheque
-- ------------------------------------------------------
-- Server version 8.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `livre`
--
DROP TABLE IF EXISTS `livre`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `livre` (
`code_catalogue` int NOT NULL,
`titre` varchar(100) DEFAULT NULL,
`id_genre` int DEFAULT NULL,
PRIMARY KEY (`code_catalogue`),
KEY `id_genre` (`id_genre`),
CONSTRAINT `livre_ibfk_1` FOREIGN KEY (`id_genre`) REFERENCES `genre_theme` (`id_genre`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `livre`
--
LOCK TABLES `livre` WRITE;
/*!40000 ALTER TABLE `livre` DISABLE KEYS */;
INSERT INTO `livre` VALUES (111111,'Du berger au savant',4),(222222,'Mille soleils splendides',5),(333333,'Le Ventre de l Atlantique',4);
/*!40000 ALTER TABLE `livre` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2021-01-25 23:24:08
|
<filename>sql-scripts/node2-step-4.sql
-- Restore the Full Backup with NORECOVEY
RESTORE DATABASE TestDatabase1 FROM DISK = 'c:\TempDSCAssets\TestDatabase1.bak' WITH NORECOVERY
GO
-- Restore the TxLog Backup with NORECOVERY
RESTORE LOG TestDatabase1 FROM DISK = 'c:\TempDSCAssets\TestDatabase1.trn' WITH NORECOVERY
GO
-- Move the database into the Availability Group
ALTER DATABASE TestDatabase1 SET HADR AVAILABILITY GROUP = sqlaocl
GO |
<filename>database/sia_rolas (14).sql
-- phpMyAdmin SQL Dump
-- version 4.7.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 18 Jul 2020 pada 15.07
-- Versi server: 10.1.29-MariaDB
-- Versi PHP: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `sia_rolas`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `m_detail_obat`
--
CREATE TABLE `m_detail_obat` (
`id` int(11) NOT NULL,
`id_obat` int(11) NOT NULL,
`id_supplier` int(11) NOT NULL,
`batch` varchar(10) NOT NULL,
`tgl_pembelian` date NOT NULL,
`exp_date` date NOT NULL,
`harga_beli` int(8) DEFAULT '0',
`qty` int(6) NOT NULL,
`status` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `m_detail_obat`
--
INSERT INTO `m_detail_obat` (`id`, `id_obat`, `id_supplier`, `batch`, `tgl_pembelian`, `exp_date`, `harga_beli`, `qty`, `status`) VALUES
(4, 1, 1, 'G129100', '2020-07-16', '2024-07-16', 5300, 10, 1),
(5, 1, 1, 'G129101', '2020-07-16', '2024-07-17', 5400, 100, 1),
(6, 2, 1, 'G129200', '2020-07-16', '2024-07-16', 10500, 100, 1),
(7, 3, 5, 'G129300', '2020-07-16', '2024-07-16', 7450, 100, 1),
(8, 3, 5, 'G129301', '2020-07-16', '2024-07-17', 7450, 50, 1);
--
-- Trigger `m_detail_obat`
--
DELIMITER $$
CREATE TRIGGER `m_detail_obat_after_delete` AFTER DELETE ON `m_detail_obat` FOR EACH ROW BEGIN
UPDATE m_obat SET total_qty = (SELECT SUM(qty) FROM m_detail_obat WHERE id_obat=OLD.id_obat) WHERE id=OLD.id_obat;
END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `m_detail_obat_after_insert` AFTER INSERT ON `m_detail_obat` FOR EACH ROW BEGIN
UPDATE m_obat SET total_qty = (SELECT SUM(qty) FROM m_detail_obat WHERE id_obat=NEW.id_obat) WHERE id=NEW.id_obat;
END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `m_detail_obat_after_update` AFTER UPDATE ON `m_detail_obat` FOR EACH ROW BEGIN
UPDATE m_obat SET total_qty = (SELECT SUM(qty) FROM m_detail_obat WHERE id_obat=OLD.id_obat) WHERE id=OLD.id_obat;
END
$$
DELIMITER ;
-- --------------------------------------------------------
--
-- Struktur dari tabel `m_dosis`
--
CREATE TABLE `m_dosis` (
`id` int(11) NOT NULL,
`konsumsi_obat` varchar(150) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `m_dosis`
--
INSERT INTO `m_dosis` (`id`, `konsumsi_obat`) VALUES
(1, '1x1 Sebelum Makan'),
(2, '1x1 Sesudah Makan'),
(3, '1x2 Sebelum Makan'),
(4, '1x2 Sesudah Makan'),
(5, '1x3 Sebelum Makan'),
(6, '1x3 Sesudah Makan');
-- --------------------------------------------------------
--
-- Struktur dari tabel `m_jabatan`
--
CREATE TABLE `m_jabatan` (
`id` int(11) NOT NULL,
`nama_jabatan` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `m_jabatan`
--
INSERT INTO `m_jabatan` (`id`, `nama_jabatan`) VALUES
(1, 'KEPALA APOTEK'),
(2, 'DOKTER'),
(3, 'PETUGAS APOTEK');
-- --------------------------------------------------------
--
-- Struktur dari tabel `m_obat`
--
CREATE TABLE `m_obat` (
`id` int(11) NOT NULL,
`kode_obat` varchar(15) NOT NULL,
`nama_obat` varchar(50) NOT NULL,
`total_qty` int(7) NOT NULL DEFAULT '0',
`harga_jual` int(11) NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `m_obat`
--
INSERT INTO `m_obat` (`id`, `kode_obat`, `nama_obat`, `total_qty`, `harga_jual`, `status`) VALUES
(1, 'REG.01.011', 'AMINOPHYLLIN INJ', 110, 6000, 1),
(2, 'REG.01.019', 'ANTRAIN', 100, 11000, 1),
(3, 'REG.02.070', 'AQUA BIDEST', 150, 8000, 1),
(4, 'REG.01.444', 'BENODON INJ', 0, 0, 1),
(5, 'REG.01.087', 'CYANOCOBALAMIN', 0, 0, 1),
(6, 'REG.01.444', 'DECAMIDON INJ', 0, 0, 1),
(7, 'REG.01.094', 'DEXAMETHASON INJ', 0, 0, 1),
(8, 'REG.01.116', 'EPINEPRINE INJ', 0, 0, 1),
(9, 'REG.01.183', 'KANAMICIN INJ', 0, 0, 1),
(10, 'REG.01.207', 'LIDOCAIN INJ', 0, 0, 1),
(11, 'REG.01.236', 'NEUROBION INJ', 0, 0, 1),
(12, 'REG.01.431', 'NEUROSANBE INJ', 0, 0, 1),
(13, 'REG.01.244', 'NORAGES', 0, 0, 1),
(14, 'REG.01.247', 'NOVALDO INJ', 0, 0, 1),
(15, 'REG.03.785', 'ONDANCENTRON 4 MG INJ', 0, 0, 1),
(16, 'REG.01.257', 'ONDANCENTRON 8 MG INJ', 0, 0, 1),
(17, 'REG.01.277', 'PEHACAIN INJ', 0, 0, 1),
(18, 'REG.01.303', 'RANITIDIN INJ', 0, 0, 1),
(19, 'REG.01.305', 'RECODRYL', 0, 0, 1),
(20, 'REG.01.325', 'SIDRIADRIL', 0, 0, 1),
(21, 'REG.01.346', 'TERAMICIN INJ', 0, 0, 1),
(22, 'REG.01.398', 'VIT B 1 INJ', 0, 0, 1),
(23, 'REG.01.396', 'VIT B COMP INJ', 0, 0, 1),
(24, 'REG.02.633', 'PULMICORT', 0, 0, 1),
(25, 'REG.02.222', 'COMBIVENT', 0, 0, 1),
(26, 'REG.02.011', 'ALBOTHYL 10MG', 0, 0, 1),
(28, 'REG.02.020', 'ALKOHOL 70%', 0, 0, 1),
(29, 'REG.02.032', 'AMBROXOL SYR', 0, 0, 1),
(30, 'REG.02.051', 'AMPICILLIN SYR', 0, 0, 1),
(31, 'REG.02.053', 'ANATON SYR', 0, 0, 1),
(32, 'REG.02.055', 'ANTASIDA SYR', 0, 0, 1),
(33, 'REG.02.074', '<NAME> (REVIL)', 0, 0, 1),
(34, 'REG.02.104', '<NAME>', 0, 0, 1),
(35, 'REG.02.111', 'BIOLISIN ', 0, 0, 1),
(36, 'REG.02.883', '<NAME>', 0, 0, 1),
(37, 'REG.02.184', '<NAME>', 0, 0, 1),
(38, 'REG.02.185', '<NAME>', 0, 0, 1),
(39, 'REG.02.189', '<NAME>', 0, 0, 1),
(40, 'REG.02.15', 'CHLORAMFENICHOL ', 0, 0, 1),
(41, 'REG.02.222', 'COMBIVEN', 0, 0, 1),
(42, 'REG.02.17', '<NAME>', 0, 0, 1),
(43, 'REG.02.248', 'DEKTROSE 5%', 0, 0, 1),
(44, 'REG.02.252', '<NAME>', 0, 0, 1),
(45, 'REG.02.258', '<NAME>', 0, 0, 1),
(46, 'REG.02.274', 'DIONICHOL', 0, 0, 1),
(47, 'REG.02.275', '<NAME>', 0, 0, 1),
(49, 'REG.02.895', '<NAME>', 0, 0, 1),
(50, 'REG.02.293', '<NAME>', 0, 0, 1),
(51, 'REG.02.904', 'ETHAFUSIN', 0, 0, 1),
(52, 'REG.02.316', 'FLUDEXIN ', 0, 0, 1),
(53, 'REG.02.343', '<NAME>', 0, 0, 1),
(54, 'REG.02.362', 'GUANISTREP', 0, 0, 1),
(55, 'REG.02.372', 'HELIXIME', 0, 0, 1),
(56, 'REG.02.837', 'IBUPROFEN SYR', 0, 0, 1),
(57, 'REG.02.391', 'IMBOOST SYR', 0, 0, 1),
(58, 'REG.02.908', 'INFUSAN PZ', 0, 0, 1),
(59, 'REG.02.398', 'INSTO', 0, 0, 1),
(60, 'REG.02.438', 'KURKUMEX SYR', 0, 0, 1),
(61, 'REG.02.449', 'LASERIN', 0, 0, 1),
(62, 'REG.02.466', 'LYSOL', 0, 0, 1),
(63, 'REG.02.492', 'MKP 15ML (CAPLANG)', 0, 0, 1),
(64, 'REG.02.493', 'MKP 30ML ( CAPLANG)', 0, 0, 1),
(65, 'REG.02.934', 'MKP 60ML ( CAPLANG)', 0, 0, 1),
(66, 'REG.02.495', 'MKP CONICARE', 0, 0, 1),
(67, 'REG.02.540', 'NOVACHLOR ', 0, 0, 1),
(68, 'REG.02.935', 'NOVADRYL', 0, 0, 1),
(69, 'REG.02.936', 'NOVAGESIC SYR', 0, 0, 1),
(70, 'REG.02.542', 'NOVAMOX SYR', 0, 0, 1),
(71, 'REG.02.543', 'NOVATRIM', 0, 0, 1),
(72, 'REG.02.878', 'OBH COMBI BF DWS', 0, 0, 1),
(73, 'REG.02.549', 'OBH COMBI BERDAHAK', 0, 0, 1),
(74, 'REG.02.554', 'OBH ITRASAL', 0, 0, 1),
(75, 'REG.02.937', 'OMEDOM SYR', 0, 0, 1),
(76, 'REG.02.583', 'PACDIN SYR', 0, 0, 1),
(77, 'REG.02.591', 'PARACETAMOL SYR', 0, 0, 1),
(78, 'REG.02.598', 'PERHIODROL 3%', 0, 0, 1),
(79, 'REG.02.618', 'POVIDON 15ML', 0, 0, 1),
(80, 'REG.02.409', 'POVIDON 1L', 0, 0, 1),
(81, 'REG.02.412', 'POVIDON 60ML', 0, 0, 1),
(82, 'REG.02.630', 'PRORIS SYR', 0, 0, 1),
(83, 'REG.02.635', 'PZ 500ML', 0, 0, 1),
(84, 'REG.02.639', 'RECO TM', 0, 0, 1),
(85, 'REG.02.640', 'RECO TT', 0, 0, 1),
(86, 'REG.02.641', 'RECOVIT', 0, 0, 1),
(88, 'REG.02.660', 'RIVANOL 300ML', 0, 0, 1),
(89, 'REG.02.662', 'ROSADRIL', 0, 0, 1),
(90, 'REG.02.679', 'SANBEPLEX DROP', 0, 0, 1),
(91, 'REG.02.681', 'SANMOL DROP', 0, 0, 1),
(92, 'REG.02.683', 'SANMOL SYR', 0, 0, 1),
(93, 'REG.02.938', 'THIAMFILEX SYR', 0, 0, 1),
(94, 'REG.02.740', 'TELON LANG PLUS 60 ML', 0, 0, 1),
(95, 'REG.02.805', 'VISINE TM', 0, 0, 1),
(98, 'REG.02.432', 'KOMIX', 0, 0, 1),
(99, 'REG.02.381', 'HUFAGRIP FLU', 0, 0, 1),
(100, 'REG.02.380', 'HUFAGRIP BP', 0, 0, 1),
(101, 'REG.02.451', 'LAXADINE', 0, 0, 1),
(102, 'REG.02.706', 'SILADEX (HIJAU)', 0, 0, 1),
(103, 'REG.02.705', 'SILADEX (BIRU)', 0, 0, 1),
(104, 'REG.02.802', 'VIC FORMULA 44', 0, 0, 1),
(105, 'REG.02.516', 'MYLANTA', 0, 0, 1),
(106, 'REG.02.323', 'FRESCARE (FRUTY)', 0, 0, 1),
(107, 'REG.02.321', 'FRESCARE (SPORTS)', 0, 0, 1),
(108, 'REG.02.509', 'MTL KONICARE', 0, 0, 1),
(110, 'REG.02.489', 'MINYAK TELON 60 ML', 0, 0, 1),
(111, 'REG.02.436', 'KONVERMEX 125', 0, 0, 1),
(112, 'REG.02.437', 'KONVERMEX 250', 0, 0, 1),
(113, 'REG.02.755', 'TOLAK ANGIN DWS', 0, 0, 1),
(114, 'REG.02.753', 'TOLAK ANGIN ANAK', 0, 0, 1),
(115, 'REG.03.012', 'ACYCLOVIR 200 MG', 0, 0, 1),
(116, 'REG.03.013', 'ACYCLOVIR 400MG', 0, 0, 1),
(117, 'REG.03.2041', 'ALERGEN', 0, 0, 1),
(118, 'REG.03.024', 'ALLOPURINOL 100MG', 0, 0, 1),
(119, 'REG.03.025', 'ALLOPURINOL 300MG', 0, 0, 1),
(122, 'REG.03.033', 'ALPARA', 0, 0, 1),
(123, 'REG.03.2082', 'ALTRAN', 0, 0, 1),
(124, 'REG.03.043', 'AMBROXOL', 0, 0, 1),
(125, 'REG.03.049', 'AMLODIPIN 10MG', 0, 0, 1),
(127, 'REG.03.053', 'AMOXICILLIN', 0, 0, 1),
(128, 'REG.03.056', 'AMPICILLIN', 0, 0, 1),
(129, 'REG.03.046', 'AMYNOPHILLYN ', 0, 0, 1),
(130, 'REG.03.048', 'AMYTRIPTILYN', 0, 0, 1),
(131, 'REG.03.067', 'ANTALGIN', 0, 0, 1),
(133, 'REG.03.067', 'ANTALGIN FM', 0, 0, 1),
(134, 'REG.03.069', '<NAME>', 0, 0, 1),
(135, 'REG.03.080', 'ASAM MEFENAMAT', 0, 0, 1),
(136, 'REG.03.081', 'ASAM TRANEXAMAT', 0, 0, 1),
(137, 'REG.03.2039', '<NAME>', 0, 0, 1),
(138, 'REG.03.085', 'ASPILET', 0, 0, 1),
(139, 'REG.03.108', 'BETAHISTIN ', 0, 0, 1),
(140, 'REG.03.118', 'BISOPROLOL', 0, 0, 1),
(142, 'REG.03.149', 'CAPSUL 00', 0, 0, 1),
(143, 'REG.03.153', 'CAPTOPRIL 25MG', 0, 0, 1),
(144, 'REG.03.167', 'CATAFLAM', 0, 0, 1),
(145, 'REG.03.168', 'CAVIPLEX', 0, 0, 1),
(146, 'REG.03.170', 'CEFADROXIL', 0, 0, 1),
(147, 'REG.03.175', 'CEFIXIME', 0, 0, 1),
(148, 'REG.03.193', 'CETIRIZINE', 0, 0, 1),
(149, 'REG.03.194', 'CHLORAMFENICHOL', 0, 0, 1),
(150, 'REG.03.201', 'CIMETIDIN', 0, 0, 1),
(151, 'REG.03.202', 'CIPROFLOXACIN', 0, 0, 1),
(152, 'REG.03.208', 'CLANEXSI', 0, 0, 1),
(153, 'REG.03.214', 'CLINDAMICIN 300MG', 0, 0, 1),
(154, 'REG.03.232', 'COMBANTRIN', 0, 0, 1),
(155, 'REG.03.242', 'CORTIDEX', 0, 0, 1),
(156, 'REG.02.245', 'COTRIMOXAZOL', 0, 0, 1),
(157, 'REG.03.262', 'DECOLGEN', 0, 0, 1),
(158, 'REG.03.263', 'DECOLSIN', 0, 0, 1),
(159, 'REG.03.265', 'DEHISTA', 0, 0, 1),
(160, 'REG.03.266', 'DEMACOLIN', 0, 0, 1),
(161, 'REG.03.272', 'DEXAMETHASON', 0, 0, 1),
(162, 'REG.03.276', 'DEXANTA', 0, 0, 1),
(163, 'REG.03.279', 'DEXTEEM PLUS', 0, 0, 1),
(164, 'REG.03.280', 'DEXTRAL ', 0, 0, 1),
(165, 'REG.03.281', 'DEXTRAL FORTE', 0, 0, 1),
(167, 'REG.03.296', 'DIMENHIDRINAT', 0, 0, 1),
(168, 'REG.02.274', 'DIONICHOL', 0, 0, 1),
(169, 'REG.03.310', 'DOMPERIDON', 0, 0, 1),
(170, 'REG.03.315', 'DULCOLAX', 0, 0, 1),
(172, 'REG.03.2081', '<NAME> ( HOLISTICARE )', 0, 0, 1),
(173, 'REG.03.365', 'FG TROCHES', 0, 0, 1),
(175, 'REG.03.371', '<NAME> ', 0, 0, 1),
(176, 'REG.03.386', 'FLUDAN', 0, 0, 1),
(178, 'REG.03.390', 'FLUNARIZIN', 0, 0, 1),
(179, 'REG.03.395', 'FOLAVIT', 0, 0, 1),
(180, 'REG.03.397', 'FORBETES 500MG', 0, 0, 1),
(181, 'REG.03.403', 'FORMUNO', 0, 0, 1),
(184, 'REG.03.427', 'GEMFIBOZIL', 0, 0, 1),
(186, 'REG.03.434', 'GLIBENCLAMID', 0, 0, 1),
(187, 'REG.03.437', 'GLIMEPIRID 2MG', 0, 0, 1),
(188, 'REG.03.439', 'GLIMEPIRIDE 4MG', 0, 0, 1),
(189, 'REG.03.458', 'GRAFALIN ( SALBUTAMOL 2MG)', 0, 0, 1),
(190, 'REG.03.460', 'GRATHEOS (NA. DICKLO)', 0, 0, 1),
(191, 'REG.03.463', 'GRAVASK 10MG', 0, 0, 1),
(192, 'REG.03.464', 'GRAVASK 5MG', 0, 0, 1),
(193, 'REG.03.466', 'GRISEOSOFULFIN', 0, 0, 1),
(194, 'REG.03.473', 'HCT', 0, 0, 1),
(195, 'REG.03.506', 'IBUPROFEN ', 0, 0, 1),
(196, 'REG.03.505', 'IBUPROFEN 400MG', 0, 0, 1),
(197, 'REG.03.2082', 'IFISON ( PREDNISON )', 0, 0, 1),
(198, 'REG.03.508', 'IMBOOST', 0, 0, 1),
(199, 'REG.03.527', 'INTERHISTIN', 0, 0, 1),
(200, 'REG.03.550', 'ISDN', 0, 0, 1),
(201, 'REG.03.564', '<NAME>', 0, 0, 1),
(202, 'REG.03.579', 'KETOCONAZOL', 0, 0, 1),
(203, 'REG.03.581', 'KETOROLAC', 0, 0, 1),
(204, 'REG.03.591', 'KURKUMEX ', 0, 0, 1),
(205, 'REG.03.600', 'LANACER', 0, 0, 1),
(206, 'REG.03.621', 'LEXAPHARM (METOCLOR)', 0, 0, 1),
(207, 'REG.03.623', 'LICOBEVIT VIT B6', 0, 0, 1),
(208, 'REG.03.624', '<NAME>', 0, 0, 1),
(209, 'REG.03.635', 'LI<NAME>', 0, 0, 1),
(210, 'REG.03.96', 'LOPERAMID', 0, 0, 1),
(211, 'REG.03.643', 'LORATADIN', 0, 0, 1),
(212, 'REG.03.654', 'MECOBALAMIN', 0, 0, 1),
(214, 'REG.03.657', 'MEFINTER', 0, 0, 1),
(215, 'REG.03.663', 'MELOXICAM 15MG', 0, 0, 1),
(216, 'REG.03.664', 'MELOXICAM 7,5MG', 0, 0, 1),
(217, 'REG.03.669', 'MERTIGO', 0, 0, 1),
(218, 'REG.03.670', 'METFORMIN', 0, 0, 1),
(219, 'REG.03.678', 'METHYLPREDNISOLON 4MG', 0, 0, 1),
(220, 'REG.02.682', 'METOCLORPERAMID', 0, 0, 1),
(221, 'REG.03.690', 'METRONIDAZOL', 0, 0, 1),
(222, 'REG.03.713', 'NATRIUM DIKLOFENAC', 0, 0, 1),
(223, 'REG.03.720', 'NEO NAPACIN', 0, 0, 1),
(224, 'REG.03.727', 'NEURALGIN', 0, 0, 1),
(225, 'REG.03.739', 'NEUROSANBE 1000', 0, 0, 1),
(226, 'REG.03.731', 'NEUROSANBE 5000', 0, 0, 1),
(227, 'REG.03.746', 'NEW DIATAB', 0, 0, 1),
(228, 'REG.03.750', 'NIFEDIPIN', 0, 0, 1),
(229, 'REG.03.758', 'NORPID 20MG', 0, 0, 1),
(230, 'REG.03.760', 'NOVABION', 0, 0, 1),
(231, 'REG.03.761', 'NOVABIOTIC(TETRASICLIN)', 0, 0, 1),
(232, 'REG.03.762', 'NOVAFLOX', 0, 0, 1),
(233, 'REG.03.763', 'NOVAKAL', 0, 0, 1),
(234, 'REG.03.766', 'NOVAMOX', 0, 0, 1),
(236, 'REG.03.767', 'NOVASTAN', 0, 0, 1),
(237, 'REG.03.774', 'NYSTATIN', 0, 0, 1),
(238, 'REG.03.775', 'NYSTATIN VAGINAL', 0, 0, 1),
(239, 'REG.03.781', 'OMEGTAMINE ( DEXA+CTM)', 0, 0, 1),
(240, 'REG.03.782', 'OMEPRAZOL ', 0, 0, 1),
(241, 'REG.03.784', 'ONDANCENTRON 4MG', 0, 0, 1),
(242, 'REG.03.810', 'PARACETAMOL 500MG', 0, 0, 1),
(245, 'REG.03.830', 'PIRACETAM 400MG', 0, 0, 1),
(246, 'REG.03.834', 'PIROXICAM 20MG', 0, 0, 1),
(247, 'REG.03.849', 'PREDNISON', 0, 0, 1),
(248, 'REG.03.890', 'RANITIDIN', 0, 0, 1),
(249, 'REG.03.1389', 'RENADINAC', 0, 0, 1),
(250, 'REG.03.458', 'SALBUTAMOL 2MG', 0, 0, 1),
(251, 'REG.03.953', 'SIMVASTATIN 20MG', 0, 0, 1),
(252, 'REG.03.963', 'SPASMAL', 0, 0, 1),
(253, 'REG.03.964', 'SPASMINAL', 0, 0, 1),
(257, 'REG.03.1005', 'TEOSAL', 0, 0, 1),
(259, 'REG.03.1010', 'TETRASICLIN 500MG', 0, 0, 1),
(260, 'REG.02.763', 'TREMENZA', 0, 0, 1),
(261, 'REG.03.1031', 'TRIAMCINOLON', 0, 0, 1),
(262, 'REG.03.1046', 'TUZALOS', 0, 0, 1),
(263, 'REG.03.1085', 'VIT B COMPLEK (KF)', 0, 0, 1),
(264, 'REG.03.1085', 'VIT B COMPLEX', 0, 0, 1),
(265, 'REG.03.1088', 'VIT B12', 0, 0, 1),
(266, 'REG.03.1089', 'VIT B6', 0, 0, 1),
(267, 'REG.03.1090', 'VIT C', 0, 0, 1),
(268, 'REG.03.1093', 'VITACIMIN', 0, 0, 1),
(269, 'REG.03.1087', 'VITAMIN B1', 0, 0, 1),
(270, 'REG.03.1108', 'VOSEA (METOCLORPERAMID)', 0, 0, 1),
(271, 'REG.03.1118', 'XON-CE', 0, 0, 1),
(272, 'REG.03.1123', 'ZINC', 0, 0, 1),
(273, 'REG.03.935', 'SANMOL', 0, 0, 1),
(274, 'REG.03.465', 'GRAZEO(PIROXICAM)', 0, 0, 1),
(275, 'REG.03.986', 'SUPRABIOTIC', 0, 0, 1),
(276, 'REG.03.656', 'MEFINAL', 0, 0, 1),
(277, 'REG.03.392', 'FOLAMIL', 0, 0, 1),
(278, 'REG.03.730', 'NEUROBION', 0, 0, 1),
(279, 'REG.03.348', '<NAME>', 0, 0, 1),
(280, 'REG.03.509', 'IMBOOST FORCE', 0, 0, 1),
(281, 'REG.03.544', 'INZA', 0, 0, 1),
(282, 'REG.03.475', 'HEMAVITON', 0, 0, 1),
(283, 'REG.03.070', 'ANTIMO', 0, 0, 1),
(284, 'REG.03.811', 'PARAMEX', 0, 0, 1),
(285, 'REG.03.126', 'BODREXIN', 0, 0, 1),
(286, 'REG.03.123', 'BODREX', 0, 0, 1),
(287, 'REG.03.864', 'PROMAG', 0, 0, 1),
(288, 'REG.03.588', '<NAME>', 0, 0, 1),
(289, 'REG.03.2036', '<NAME>', 0, 0, 1),
(290, 'REG.03.587', '<NAME>', 0, 0, 1),
(291, 'REG.03.923', '<NAME>', 0, 0, 1),
(292, 'REG.03.920', '<NAME>', 0, 0, 1),
(293, 'REG.03.921', 'SAKATON<NAME>', 0, 0, 1),
(294, 'REG.03.922', '<NAME>', 0, 0, 1),
(295, 'REG.02.437', 'KONVERMEX 250', 0, 0, 1),
(296, 'REG.03.1023', '<NAME>', 0, 0, 1),
(297, 'REG.04.039', 'L- BIO', 0, 0, 1),
(298, 'REG.04.079', 'LACTO B', 0, 0, 1),
(299, 'REG.04.048', 'ORALIT', 0, 0, 1),
(300, 'REG.04.083', '<NAME>', 0, 0, 1),
(301, 'REG.04.058', '<NAME>', 0, 0, 1),
(302, 'REG.04.059', 'SAL<NAME>ALK (KF)', 0, 0, 1),
(303, 'REG.04.002', '<NAME>', 0, 0, 1),
(304, 'REG.04.074', 'VEGETA', 0, 0, 1),
(305, 'REG.05.062', '<NAME>', 0, 0, 1),
(306, 'REG.05.167', '<NAME>', 0, 0, 1),
(307, 'REG.05.172', 'BETAMETASON ZK', 0, 0, 1),
(308, 'REG.05.005', 'BETASON', 0, 0, 1),
(309, 'REG.05.043', 'BIOPLACENTON', 0, 0, 1),
(310, 'REG.05.122', 'BURNAZIN', 0, 0, 1),
(311, 'REG.05.039', '<NAME>', 0, 0, 1),
(312, 'REG.05.179', 'COUNTERPAIN 15G', 0, 0, 1),
(313, 'REG.05.033', '<NAME>', 0, 0, 1),
(314, 'REG.05.162', '<NAME>', 0, 0, 1),
(315, 'REG.05.163', 'FUNGIDERM', 0, 0, 1),
(316, 'REG.05.123', 'GENOINT ZK', 0, 0, 1),
(317, 'REG.05.055', 'GENOINT ZM', 0, 0, 1),
(318, 'REG.05.192', '<NAME> NO 2', 0, 0, 1),
(319, 'REG.05.164', '<NAME>', 0, 0, 1),
(320, 'REG.05.165', 'ICHTYOL', 0, 0, 1),
(321, 'REG.05.050', 'KENALOG', 0, 0, 1),
(322, 'REG.05.166', 'KETOCONAZOL 10GR', 0, 0, 1),
(323, 'REG.05.166', 'KETOCONAZOL 5GR', 0, 0, 1),
(324, 'REG.05.072', 'LAFALOS', 0, 0, 1),
(325, 'REG.05.065', 'MICONAZOL', 0, 0, 1),
(326, 'REG.05.168', 'MOMETASON', 0, 0, 1),
(327, 'REG.05.145', '<NAME>', 0, 0, 1),
(328, 'REG.05.169', 'OXYTETRASICLIN', 0, 0, 1),
(329, 'REG.05.087', 'RECO ZM', 0, 0, 1),
(330, 'REG.05.150', '<NAME>', 0, 0, 1),
(331, 'REG.05.217', '<NAME>', 0, 0, 1),
(332, 'REG.05.170', 'SALEP 24', 0, 0, 1),
(333, 'REG.05.096', 'SCABIMITE ', 0, 0, 1),
(334, 'REG.05.173', 'GENTALEX', 0, 0, 1),
(335, 'REG.05.003', 'ANTIHEMOROID', 0, 0, 1),
(336, 'REG.05.002', 'TROMBOPHOP GEL', 0, 0, 1),
(338, 'REG.06.016', 'HANSAPLAST', 0, 0, 1),
(339, 'REG.06.094', 'HYPAVIX 10X5', 0, 0, 1),
(340, 'REG.06.021', 'HYPAVIX 5X5', 0, 0, 1),
(341, 'REG.06.045', 'KASSA DRC', 0, 0, 1),
(342, 'REG.06.138', '<NAME>', 0, 0, 1),
(343, 'REG.06.006', '<NAME>', 0, 0, 1),
(344, 'REG.06.139', 'LEUCOPLAST 0,5X5', 0, 0, 1),
(345, 'REG.06.140', 'LEUCOPLAST 3X5', 0, 0, 1),
(346, 'REG.06.139', 'LEUCOPLAST 7,5X4,5', 0, 0, 1),
(347, 'REG.06.028', 'LOMATUL', 0, 0, 1),
(348, 'REG.06.023', 'TENSOCRAPE 4 INCH', 0, 0, 1),
(349, 'REG.06.024', 'TENSOCRAPE 6 INCH', 0, 0, 1),
(350, 'REG.06.121', 'VERBAN 5CM', 0, 0, 1),
(351, 'REG.06.122', '<NAME>', 0, 0, 1),
(352, 'REG.06.123', '<NAME>', 0, 0, 1),
(353, 'REG.06.124', '<NAME>', 0, 0, 1),
(354, 'REG.06.140', '<NAME>', 0, 0, 1),
(355, 'REG.07.146', 'CAT GUT PLAIN 2/0', 0, 0, 1),
(356, 'REG.07.147', 'CAT GUT PLAIN 3/0', 0, 0, 1),
(357, 'REG.02.196', '<NAME>', 0, 0, 1),
(358, 'REG.07.1273', 'CROMIC 2/0', 0, 0, 1),
(359, 'REG.07.257', 'DISPO 10 CC', 0, 0, 1),
(360, 'REG.07.254', 'DISPO 1CC', 0, 0, 1),
(361, 'REG.07.261', 'DISPO 3 CC', 0, 0, 1),
(362, 'REG.07.267', 'DISPO 5CC', 0, 0, 1),
(364, 'REG.07.565', 'HECTING NALD-1.0', 0, 0, 1),
(365, 'REG.07.442', 'INFUSET', 0, 0, 1),
(366, 'REG.07.569', 'IV CATETER 18', 0, 0, 1),
(368, 'REG.07.469', '<NAME>', 0, 0, 1),
(369, 'REG.07.472', 'KAPAS 500GR', 0, 0, 1),
(370, 'REG.07.1450', 'LANCET', 0, 0, 1),
(371, 'REG.07.590', 'MASKER', 0, 0, 1),
(372, 'REG.07.589', 'MAXTER M', 0, 0, 1),
(373, 'REG.07.590', 'MAXTER S ', 0, 0, 1),
(374, 'REG.07.591', 'MAXTER STERIL 7,5', 0, 0, 1),
(375, 'REG.07.600', 'MEDICUT', 0, 0, 1),
(376, 'REG.07.601', 'MEDICUT 20', 0, 0, 1),
(377, 'REG.07.640', 'NEEDLE 23', 0, 0, 1),
(378, 'REG.07.645', 'NESCO GLUCOSE', 0, 0, 1),
(379, 'REG.07.646', '<NAME>', 0, 0, 1),
(380, 'REG.07.647', 'NESCO URID ACID', 0, 0, 1),
(381, 'REG.07.571', 'OPIUM GULA', 0, 0, 1),
(382, 'REG.07.1295', 'SAVE GLOVE L', 0, 0, 1),
(383, 'REG.07.573', 'SAVE GLOVE M', 0, 0, 1),
(384, 'REG.07.921', 'SENSITIVE', 0, 0, 1),
(385, 'REG.07.1237', 'STERACAT 24', 0, 0, 1),
(386, 'REG.07.1021', 'SURFLO 20', 0, 0, 1),
(387, 'REG.07.073', 'TENSI ABN', 0, 0, 1),
(388, 'REG.07.1087', 'TIMBANGAN', 0, 0, 1),
(389, 'REG.07.1238', 'VERBAN TRUNOL', 0, 0, 1),
(390, 'REG.07.572', 'AKURAT', 0, 0, 1),
(391, 'REG.07.662', 'ONE MED TESPEC', 0, 0, 1),
(392, 'REG.06.121', 'VERBAN 5CM', 0, 0, 1),
(394, 'REG.02.938', 'KREOLIN', 0, 0, 1),
(395, 'REG.02.939', 'KONICARE GEL PENGURANG GATAL', 0, 0, 1),
(396, 'REG.02.637', 'R L', 0, 0, 1),
(397, 'REG.06.122', 'NATES DAY', 0, 0, 1),
(398, 'REG.06.124', 'NATES PANTY', 0, 0, 1),
(399, 'REG.03.460', 'GRATHEOS', 0, 0, 1),
(400, 'REG.03.463', 'GRAVASK 10 MG', 0, 0, 1),
(401, 'REG.04.9', 'L BIO', 0, 0, 1),
(402, 'REG.05.153', '<NAME>', 0, 0, 1),
(403, 'REG.07.647', '<NAME>', 0, 0, 1),
(404, 'REG.03.393', 'FOL<NAME>SUL', 0, 0, 1),
(405, 'REG.02.286', 'ENTEROSTOP HERBAL ANAK', 0, 0, 1),
(406, 'REG.02.337', 'GAZERO', 0, 0, 1),
(407, 'REG.02.054', '<NAME>', 0, 0, 1),
(408, 'REG.02.940', '<NAME>', 0, 0, 1),
(410, 'REG.03.927', 'SALBUTAMOL 4 MG', 0, 0, 1),
(411, 'REG.02.410', '<NAME> 30 ML', 0, 0, 1),
(412, 'REG.07.564', '<NAME>', 0, 0, 1),
(413, 'REG.02.712', 'SIRPLUS STRAWBERRY', 0, 0, 1),
(414, 'REG.02.709', 'SIRPLUS ANGGUR', 0, 0, 1),
(415, 'REG.02.324', 'FRESHCARE GREENTEA', 0, 0, 1),
(416, 'REG.02.325', 'FRESHCARE LAVENDER', 0, 0, 1),
(419, 'REG.02.326', 'FRESHCARE MAA STRONG', 0, 0, 1),
(420, 'REG.02.322', 'FRESHCARE CITRUS', 0, 0, 1),
(421, 'REG.05.179', 'COUNTERPAIN 15 GRAM', 0, 0, 1),
(422, 'REG.03.902', 'RHINOS SR', 0, 0, 1),
(423, 'REG.05.174', 'INERSON', 0, 0, 1),
(424, 'REG.02.797', '<NAME>', 0, 0, 1),
(425, 'REG.07.573', 'CROMIC 3/0 + 1/2 GT', 0, 0, 1),
(428, 'REG.07.1072', 'THER<NAME>', 0, 0, 1),
(429, 'REG.01.393', '<NAME>', 0, 0, 1),
(430, 'REG.04.059', '<NAME>', 0, 0, 1),
(431, 'REG.05.175', '<NAME>', 0, 0, 1),
(432, 'REG.04.032', 'HEROCIN', 0, 0, 1),
(433, 'REG.03.468', 'GUAIFENESIN', 0, 0, 1),
(434, 'REG.02.744', '<NAME>', 0, 0, 1),
(435, 'REG.02.052', '<NAME>', 0, 0, 1),
(437, 'REG.02.323', 'FRESHCARE FRUTTY', 0, 0, 1),
(438, 'REG.02.046', '<NAME>', 0, 0, 1),
(440, 'REG.03.141', 'Calortusin', 0, 0, 1),
(442, 'REG.01.084', '<NAME>', 0, 0, 1),
(443, 'REG.06.020', 'VERBAN 10 CM', 0, 0, 1),
(444, 'REG.03.413', 'FUROSEMID KF', 0, 0, 1),
(445, 'REG.03.1087', 'VITAMIN B1 KF', 0, 0, 1),
(446, 'REG.03.819', 'PHARMATON FORMULA', 0, 0, 1),
(447, 'REG.01.100', 'DIPENHIDRAMIN', 0, 0, 1),
(449, 'REG.03.2080', 'ENERVIT', 0, 0, 1),
(451, 'REG.03.2037', 'ESTER C TUBE', 0, 0, 1),
(452, 'REG.03.169', 'CDR', 0, 0, 1),
(453, 'REG.02.548', 'OBH COMBI ANAK', 0, 0, 1),
(454, 'REG.07.290', 'EASY TOUCH GLUCOSE', 0, 0, 1),
(455, 'REG.07.292', 'EASY TOUCH ASAM URAT', 0, 0, 1),
(457, 'REG.07.291', 'EASY TOUCH KOLESTEROL', 0, 0, 1),
(458, 'REG.02.725', 'SUCRALFAT', 0, 0, 1),
(459, 'REG.03.732', 'NEUROBION FORTE', 0, 0, 1),
(460, 'REG.03.040', 'LEVOFLOXACIN', 0, 0, 1),
(461, 'REG.05.176', '<NAME>', 0, 0, 1),
(462, 'REG.02.329', 'FRESHCARE SPLASH ', 0, 0, 1),
(463, 'REG.02.485', 'FRESHCARE SANDAL WOOD', 0, 0, 1),
(464, 'REG.02.485', 'MINYAK TAWON CC', 0, 0, 1),
(465, 'REG.02.486', 'MINYAK TAWON DD', 0, 0, 1),
(466, 'REG.02.487', 'MINYAK TAWON EE', 0, 0, 1),
(467, 'REG.02.488', 'MINYAK TAWON FF', 0, 0, 1),
(468, 'REG.05.177', 'VITAQUIN CREAM 15 GR', 0, 0, 1),
(469, 'REG.07.578', '<NAME>', 0, 0, 1),
(470, 'REG.07.588', 'MAXTER L', 0, 0, 1),
(471, 'REG.07.574', '<NAME>', 0, 0, 1),
(473, 'REG.07.865', 'POT PLASTIK', 0, 0, 1),
(474, 'REG.03.286', 'DIAPET', 0, 0, 1),
(475, 'REG.03.287', 'DIAPET NR', 0, 0, 1),
(476, 'REG.05.178', 'BALSEM LANG', 0, 0, 1),
(477, 'REG.06.141', '<NAME>', 0, 0, 1),
(478, 'REG.06.126', '<NAME>', 0, 0, 1),
(479, 'REG.02.288', '<NAME>', 0, 0, 1),
(481, 'REG.03.717', 'NATUR E ADVANCED', 0, 0, 1),
(482, 'REG.03.718', 'NATURE E NOURISHING', 0, 0, 1),
(484, 'REG.06.126', '<NAME>', 0, 0, 1),
(485, 'REG.06.127', 'BYE BYE FEVER ANAK', 0, 0, 1),
(486, 'REG.03.2038', 'AMBEVEN', 0, 0, 1),
(487, 'REG.06.142', '<NAME>ER (KOYO)', 0, 0, 1),
(488, 'REG.06.143', '<NAME>', 0, 0, 1),
(489, 'REG.06.144', 'H<NAME>', 0, 0, 1),
(491, 'REG.03.719', 'NEO ENTEROSTOP', 0, 0, 1),
(492, 'REG.03.1083', 'VIOSTIN DS', 0, 0, 1),
(493, 'REG.05.193', 'COUNTERPAIN 5 GR', 0, 0, 1),
(494, 'REG.02.444', 'LACTACYD WOMAN', 0, 0, 1),
(495, 'REG.02.013', 'ALBOTHYL 5 ML', 0, 0, 1),
(496, 'REG.05.180', 'COUNTERPAIN COOL', 0, 0, 1),
(497, 'REG.02.390', 'IMBOOST FORCE SYR', 0, 0, 1),
(498, 'REG.03.154', 'CAPTOPRIL ETA', 0, 0, 1),
(501, 'REG.07.221', 'CUT GUT P-LAIN 3/0 + 1/2 GT', 0, 0, 1),
(502, 'REG.07.640', 'NEEDLE 23 BD', 0, 0, 1),
(503, 'REG.03.694', 'MICROGYNON', 0, 0, 1),
(504, 'REG.03.050', 'AMLODIPIN 5 MG', 0, 0, 1),
(505, 'REG.07.587', 'MAXTER EXAM GLV PEP XS', 0, 0, 1),
(507, 'REG.03.369', 'FISHQUA', 0, 0, 1),
(508, 'REG.03.977', 'STIMUNO FORTE', 0, 0, 1),
(511, 'REG.03.823', 'PI<NAME>', 0, 0, 1),
(512, 'REG.03.252', 'CTM (KALENG)', 0, 0, 1),
(513, 'REG.03.824', '<NAME>', 0, 0, 1),
(515, 'REG.03.2034', 'FLUDANE FORTE', 0, 0, 1),
(521, 'REG.07.561', 'MASKER EARLOOP', 0, 0, 1),
(522, 'REG.02.697', 'SEVEN SEAS SIRUP', 0, 0, 1),
(523, 'REG.03.933', 'SANGOBION', 0, 0, 1),
(524, 'REG.02.803', 'VICKS INHALER', 0, 0, 1),
(526, 'REG.05.181', 'RHEUMASON WHITE CREAM', 0, 0, 1),
(527, 'REG.02.525', 'NELLCO SPECIAL OBH 100 ML', 0, 0, 1),
(528, 'REG.02.526', 'NELLCO SPECIAL OBH 55 ML', 0, 0, 1),
(529, 'REG.03.054', 'AMOXSAN 500', 0, 0, 1),
(530, 'REG.03.2040', '<NAME>', 0, 0, 1),
(531, 'REG.03.373', '<NAME>', 0, 0, 1),
(532, 'REG.03.374', '<NAME>', 0, 0, 1),
(537, 'REG.02.724', 'STIMUNO SYRUP', 0, 0, 1),
(538, 'REG.03.382', 'FLAMIGRA', 0, 0, 1),
(540, 'REG.03.961', 'SP TROGHES RASA MELON', 0, 0, 1),
(541, 'REG.03.962', 'SP TROGHES RASA STRAWBERRY', 0, 0, 1),
(542, 'REG.03.398', 'FORBETES 850', 0, 0, 1),
(543, 'REG.06.007', 'KAPAS 1 KG', 0, 0, 1),
(544, 'REG.03.031', 'glucodex', 0, 0, 1),
(546, 'REG.02.710', 'SIRPLUS JERUK', 0, 0, 1),
(547, 'REG.04.008', 'CATAFLAM FAST', 0, 0, 1),
(548, 'REG.05.182', 'TRANSPULMIN BB', 0, 0, 1),
(549, 'REG.03.978', 'STREPSIL COOL ', 0, 0, 1),
(550, 'REG.03.2040', 'STREPSIL ORIGINAL', 0, 0, 1),
(551, 'REG.03.979', 'STREPSIL SHOOTING', 0, 0, 1),
(552, 'REG.03.980', 'STREPSIL SINGLE COOL', 0, 0, 1),
(553, 'REG.03.981', 'STREPSIL SINGLE SHOOTING', 0, 0, 1),
(554, 'REG.03.189', '<NAME>', 0, 0, 1),
(555, 'REG.03.190', '<NAME>', 0, 0, 1),
(556, 'REG.03.191', '<NAME>', 0, 0, 1),
(557, 'REG.02.818', 'WOODS BATUK SYR 60 ML', 0, 0, 1),
(558, 'REG.02.817', 'WOODS BATUK EXP SYR 60 ML', 0, 0, 1),
(559, 'REG.03.1112', 'WOODS LOZENGES', 0, 0, 1),
(560, 'REG.03.1113', 'WOODS LO<NAME> ', 0, 0, 1),
(562, 'REG.03.1114', '<NAME>', 0, 0, 1),
(563, 'REG.03.328', 'ENER<NAME>', 0, 0, 1),
(564, 'REG.05.183', 'HOTIN DCL ', 0, 0, 1),
(565, 'REG.05.184', 'HOTIN CREAM 60 ML', 0, 0, 1),
(566, 'REG.05.185', 'HOTIN CREAM 120 ML', 0, 0, 1),
(567, 'REG.05.186', 'HOTIN AROMATERAPI 60 ML', 0, 0, 1),
(568, 'REG.05.187', 'HOTIN CREAM AROMATERAPY 120 ML', 0, 0, 1),
(569, 'REG.05.188', 'HOTIN KOYO AROMATERAPY', 0, 0, 1),
(571, 'REG.07.936', 'SELANG OKSIGEN DEWASA', 0, 0, 1),
(572, 'REG.06.128', 'U-PAD ', 0, 0, 1),
(573, 'REG.06.131', 'KO<NAME>', 0, 0, 1),
(574, 'REG.02.114', 'BIOVITAN', 0, 0, 1),
(575, 'REG.03.375', 'FITCOM-GUMMY-CALC KUNING', 0, 0, 1),
(576, 'REG.02.389', '<NAME>', 0, 0, 1),
(577, 'REG.02.008', 'AKILEN TETES TELINGA', 0, 0, 1),
(579, 'REG.07.455', 'iodin cup', 0, 0, 1),
(580, 'REG.07.451', 'INSTRUMEN BAK', 0, 0, 1),
(581, 'REG.07.575', 'NIERBEKEN ', 0, 0, 1),
(582, 'REG.07.576', 'SURGICAL MASK', 0, 0, 1),
(583, 'REG.01.185', 'KB ANDALAN SUNTIKAN', 0, 0, 1),
(584, 'REG.03.929', 'SANAFLU', 0, 0, 1),
(585, 'REG.03.152', 'CAPTOPRIL 12.5MG', 0, 0, 1),
(586, 'REG.07.149', 'MASKER GIRLY', 0, 0, 1),
(587, 'REG.02.606', 'PLANTACID SYR 100 ML', 0, 0, 1),
(588, 'REG.03.841', 'POLYSILANE TABLET', 0, 0, 1),
(589, 'REG.03.2041', 'FITKOM GRAPE', 0, 0, 1),
(590, 'REG.03.376', 'FITKOM ORANGE', 0, 0, 1),
(591, 'REG.03.377', 'FITKOM STRAWBERRY', 0, 0, 1),
(592, 'REG.03.611', 'LELAP', 0, 0, 1),
(593, 'REG.02.029', 'ULSAFAT SIRUP', 0, 0, 1),
(594, 'REG.07.018', 'ALAT EASY TOUCH', 0, 0, 1),
(596, 'REG.03.840', 'POLDANMIG ', 0, 0, 1),
(597, 'REG.03.102', 'BECOM-C CAPLET', 0, 0, 1),
(598, 'REG.02.527', '<NAME>', 0, 0, 1),
(599, 'REG.02.193', '<NAME>', 0, 0, 1),
(601, 'REG.05.083', 'OXYTETRASIKLIN SM', 0, 0, 1),
(602, 'REG.03.734', 'NEURODEX', 0, 0, 1),
(604, 'REG.02.238', 'CURCUMA PLUS GOLD STRAWBERRY', 0, 0, 1),
(605, 'REG.02.237', 'CURCUMA PLUS GOLD JERUK', 0, 0, 1),
(606, 'REG.03.1143', 'TRIFACORT 5 MG', 0, 0, 1),
(607, 'REG.03.1220', 'LANAVEN', 0, 0, 1),
(608, 'REG.02.499', 'MKP LANG 120 ML', 0, 0, 1),
(609, 'REG.02.496', 'MKP EUCALIPTUS 30 ML', 0, 0, 1),
(611, 'REG.02.490', 'MINYAK TELON LANG 30 ML', 0, 0, 1),
(612, 'REG.07.097', 'NORIT', 0, 0, 1),
(613, 'REG.03.815', 'PEHAVRAL', 0, 0, 1),
(614, 'REG.07.67', '<NAME>', 0, 0, 1),
(615, 'REG.02.517', 'MYLANTA 150 ML', 0, 0, 1),
(616, 'REG.03.233', 'COMBANTRIN 250', 0, 0, 1),
(617, 'REG.03.053', '<NAME>', 0, 0, 1),
(618, 'REG.03.2035', '<NAME>', 0, 0, 1),
(619, 'REG.03.791', '<NAME>', 0, 0, 1),
(622, 'REG.04.011', 'DIABETASOL SWEETENER 25X1', 0, 0, 1),
(623, 'REG.04.011', 'DIABETASOL SWEETENER 50X1', 0, 0, 1),
(624, 'REG.04.065', '<NAME>', 0, 0, 1),
(625, 'REG.04.064', '<NAME>', 0, 0, 1),
(626, 'REG.02.688', '<NAME>', 0, 0, 1),
(627, 'REG.03.843', 'PONSTAN', 0, 0, 1),
(628, 'REG.07.530', 'LASERIN 110 ML', 0, 0, 1),
(629, 'REG.01.884', '<NAME>', 0, 0, 1),
(630, 'REG.02.497', 'MKP GAJAH 30 ML', 0, 0, 1),
(631, 'REG.02.498', 'MKP GAJAH 60 ML', 0, 0, 1),
(632, 'REG.03.620', 'LEXACROL', 0, 0, 1),
(633, 'REG.03.355', '<NAME>', 0, 0, 1),
(634, 'REG.02.886', '<NAME>', 0, 0, 1),
(635, 'REG.02.887', 'ASEPTIC GEL+DISPENSER', 0, 0, 1),
(636, 'REG.02.698', 'SEVENSEAS BECOMBION SIRUP', 0, 0, 1),
(637, 'REG.02.888', 'SEVENSEAS BECOMBION SIRUP LYSIN', 0, 0, 1),
(638, 'REG.03.124', 'BODREX FLU & BATUK', 0, 0, 1),
(639, 'REG.02.116', '<NAME>', 0, 0, 1),
(640, 'REG.02.115', 'BISOLVON BATUK & FLU SIRUP', 0, 0, 1),
(641, 'REG.03.575', 'KAPSUL NO 1', 0, 0, 1),
(642, 'REG.03.576', 'KAPSUL NO 2', 0, 0, 1),
(644, 'REG.03.1076', 'VEGETA HERBAL', 0, 0, 1),
(645, 'REG.07.857', 'PLESTERIN ROLL 5X5', 0, 0, 1),
(647, 'REG.03.035', 'ALPRAZOLAM 0.5MG', 0, 0, 1),
(648, 'REG.03.226', 'CODIKAF 20MG', 0, 0, 1),
(649, 'REG.03.953', 'SIMVASTATIN 20 MG KF', 0, 0, 1),
(650, 'REG.03.431', 'GITAS PLUS', 0, 0, 1),
(651, 'REG.03.973', 'STARMUNO', 0, 0, 1),
(652, 'REG.02.665', 'SAFE CARE 10 ML', 0, 0, 1),
(653, 'REG.02.889', 'SAFE CARE 5 ML', 0, 0, 1),
(654, 'REG.03.254', 'CTM PHAPROS', 0, 0, 1),
(655, 'REG.03.058', 'ANALSIK', 0, 0, 1),
(656, 'REG.03.934', '<NAME>', 0, 0, 1),
(657, 'REG.02.501', 'MKP LANG EUKALIPTUS LAVENDER', 0, 0, 1),
(658, 'REG.02.788', 'V FRESH 8 ML', 0, 0, 1),
(659, 'REG.02.789', 'V FRESH HOT 8 ML', 0, 0, 1),
(660, 'REG.05.189', '<NAME>', 0, 0, 1),
(661, 'REG.05.190', '<NAME>', 0, 0, 1),
(662, 'REG.02.359', '<NAME>', 0, 0, 1),
(663, 'REG.02.749', 'TJ JOOYBEE MD STOW', 0, 0, 1),
(664, 'REG.03.370', 'FITBOOST', 0, 0, 1),
(665, 'REG.02.675', 'SANADRYL DMP 60 ML', 0, 0, 1),
(667, 'REG.04.021', 'ENTRASOL GOLD COKLAT', 0, 0, 1),
(668, 'REG.04.022', 'ENTRASOL GOLD PLAIN', 0, 0, 1),
(670, 'REG.06.121', 'VERBAN 15 CM', 0, 0, 1),
(671, 'REG.05.191', '<NAME>', 0, 0, 1),
(673, 'REG.02.119', 'BISOLVON SOLUTIO', 0, 0, 1),
(674, 'REG.05.192', 'SUPERHOID SUPP', 0, 0, 1),
(675, 'REG.05.006', 'KETOCONAZOL CREAM 2 % (DEXA)', 0, 0, 1),
(676, 'REG.03.952', 'SIMVASTATIN 10 MG', 0, 0, 1),
(677, 'REG.06.145', 'KAPAS 250 GRAM', 0, 0, 1),
(678, 'REG.07.898', 'SAVE GLOVE S', 0, 0, 1),
(679, 'REG.02.754', '<NAME>', 0, 0, 1),
(680, 'REG.02.756', '<NAME>', 0, 0, 1),
(681, 'REG.03.083', 'ASIFIT', 0, 0, 1),
(682, 'REG.02.092', 'BATUGIN ELIXIR 300 ML', 0, 0, 1),
(683, 'REG.02.430', '<NAME>AN', 0, 0, 1),
(684, 'REG.02.433', 'KOMIX OBH PE', 0, 0, 1),
(685, 'REG.02.766', 'TRIAMINIC BATUK FLU', 0, 0, 1),
(686, 'REG.02.768', '<NAME>', 0, 0, 1),
(687, 'REG.02.003', 'ACTIFED COUGH ( MERAH)', 0, 0, 1),
(688, 'REG.02.004', 'ACTIFED PLUS (HIJAU)', 0, 0, 1),
(689, 'REG.03.805', '<NAME>', 0, 0, 1),
(690, 'REG.03.636', 'LODIA', 0, 0, 1),
(691, 'REG.02.482', 'MINYAK KAPAK 28 ML', 0, 0, 1),
(692, 'REG.02.751', 'TOBRO TM', 0, 0, 1),
(693, 'REG.02.820', '<NAME>', 0, 0, 1),
(694, 'REG.03.806', '<NAME>', 0, 0, 1),
(695, 'REG.03.2032', '<NAME>', 0, 0, 1),
(696, 'REG.05.074', 'VOLTAREN GEL 50gr', 0, 0, 1),
(697, 'REG.05.242', 'VOLTAREN GEL 100gr', 0, 0, 1),
(698, 'REG.02.027', '<NAME>', 0, 0, 1),
(699, 'REG.03.724', 'NEOZEP FORTE', 0, 0, 1),
(700, 'REG.02.361', 'GPU SEREH 60 ML', 0, 0, 1),
(701, 'REG.03.289', 'DIAZEPAM 2 MG', 0, 0, 1),
(703, 'REG.03.603', 'LANSOPRAZOL', 0, 0, 1),
(704, 'REG.01.443', 'DE<NAME> INJ', 0, 0, 1),
(705, 'REG.01.184', '<NAME> 3 BULAN', 0, 0, 1),
(706, 'REG.02.049', '<NAME>', 0, 0, 1),
(707, 'REG.02.373', '<NAME>', 0, 0, 1),
(708, 'REG.05.194', 'VOLTADEX 1% 20 GR', 0, 0, 1),
(709, 'REG.02.402', '<NAME>', 0, 0, 1),
(710, 'REG.03.1420', 'BECOM-ZET', 0, 0, 1),
(711, 'REG.03.985', 'SUPERTETRA', 0, 0, 1),
(712, 'REG.01.388', 'VALISANBE', 0, 0, 1),
(713, 'REG.03.130', 'BRAXIDIN', 0, 0, 1),
(714, 'REG.03.721', '<NAME>', 0, 0, 1),
(715, 'REG.03.607', '<NAME>', 0, 0, 1),
(716, 'REG.03.559', 'JESSCOOL', 0, 0, 1),
(717, 'REG.05.195', '<NAME>', 0, 0, 1),
(718, 'REG.02.435', '<NAME>', 0, 0, 1),
(719, 'REG.03.586', 'KONIDIN', 0, 0, 1),
(720, 'REG.03.812', '<NAME>', 0, 0, 1),
(721, 'REG.05.196', 'VIRUGON', 0, 0, 1),
(723, 'REG.03.136', 'CALADIN POWDER 100 GR ', 0, 0, 1),
(724, 'REG.04.033', 'HEROCYN 150 GR', 0, 0, 1),
(725, 'REG.04.007', 'CALADIN POWDER 60 GR', 0, 0, 1),
(726, 'REG.02.178', 'CALADIN LOTION 95 ML', 0, 0, 1),
(727, 'REG.03.134', 'BUSCOPAN', 0, 0, 1),
(728, 'REG.01.317', '<NAME>', 0, 0, 1),
(729, 'REG.02.555', '<NAME>', 0, 0, 1),
(730, 'REG.06.130', 'LEUCOPLAST 2X5', 0, 0, 1),
(731, 'REG.02.830', 'ZINKID', 0, 0, 1),
(733, 'REG.03.118', 'BISOPROLOL OGB DEXA', 0, 0, 1),
(734, 'REG.07.578', 'BOLA TENSI + PENTIL', 0, 0, 1),
(735, 'REG.05.197', '<NAME>', 0, 0, 1),
(736, 'REG.01.049', '<NAME>', 0, 0, 1),
(737, 'REG.02.284', '<NAME>', 0, 0, 1),
(738, 'REG.07.579', 'REGULATOR O2', 0, 0, 1),
(739, 'REG.07.579', '<NAME>', 0, 0, 1),
(740, 'REG.07.611', 'MESS 11', 0, 0, 1),
(742, 'REG.02.791', 'VAPORIN', 0, 0, 1),
(743, 'REG.02.019', 'ALKOHOL 100 ML', 0, 0, 1),
(744, 'REG.07.580', '<NAME>', 0, 0, 1),
(746, 'REG.03.2042', 'ERLAMOL', 0, 0, 1),
(747, 'REG.04.020', 'ENTRASOL AKTIF VANILA', 0, 0, 1),
(748, 'REG.04.019', 'ENTRASOL AKTIF COKLAT', 0, 0, 1),
(749, 'REG.04.054', '<NAME>', 0, 0, 1),
(750, 'REG.04.055', 'PRENAGEN MOMMY COKLAT', 0, 0, 1),
(751, 'REG.02.360', 'GPU SEREH 30 ML', 0, 0, 1),
(752, 'REG.05.198', 'GPU KRIM SEREH 150 GR', 0, 0, 1),
(753, 'REG.02.757', '<NAME>', 0, 0, 1),
(755, 'REG.03.780', 'O<NAME>', 0, 0, 1),
(756, 'REG.06.146', '<NAME>', 0, 0, 1),
(757, 'REG.02.490', 'TELON LANG PLUS 30 ML', 0, 0, 1),
(758, 'REG.03.419', 'GALVUSMET', 0, 0, 1),
(759, 'REG.03.041', 'AMARYL M2', 0, 0, 1),
(760, 'REG.04.080', 'JOVIAL', 0, 0, 1),
(764, 'REG.07.581', 'STETOSKOP DLX DWS', 0, 0, 1),
(765, 'REG.02.357', 'GOM', 0, 0, 1),
(766, 'REG.02.495', 'KONICARE KAYU PUTIH PLUS 60 ML', 0, 0, 1),
(768, 'REG.03.2043', 'METFORMIN DEXA', 0, 0, 1),
(769, 'REG.03.681', 'METILPREDNISOLON NULAB', 0, 0, 1),
(770, 'REG.06.077', 'ALKOHOL SWAB', 0, 0, 1),
(771, 'REG.03.2071', '<NAME>', 0, 0, 1),
(772, 'REG.02.680', '<NAME>', 0, 0, 1),
(773, 'REG.02.091', 'BATUGIN 120 ML', 0, 0, 1),
(774, 'REG.02.285', 'ENKASARI 120 ML', 0, 0, 1),
(775, 'REG.02.327', 'FRESHCARE MIX CITRUS', 0, 0, 1),
(776, 'REG.05.196', 'CORSABALM 30 GRAM', 0, 0, 1),
(777, 'REG.02.550', 'OBH COMBI BF MADU', 0, 0, 1),
(778, 'REG.02.742', 'TENANGIN ', 0, 0, 1),
(779, 'REG.06.015', 'DARYANT-TULL', 0, 0, 1),
(780, 'REG.03.2045', 'NOVAMAG', 0, 0, 1),
(782, 'REG.02.890', 'ONE CLEAN 5,25% 1 LITER', 0, 0, 1),
(783, 'REG.03.953', 'SIMVASTATIN 20 MG GRAHA', 0, 0, 1),
(785, 'REG.06.132', 'AVAIL PANTI LINER ', 0, 0, 1),
(786, 'REG.06.133', 'AVAIL PAGI BIRU', 0, 0, 1),
(787, 'REG.06.134', 'AVAIL MALAM PINK', 0, 0, 1),
(788, 'REG.03.2046', 'ACTAPIN 5 MG ', 0, 0, 1),
(789, 'REG.03.2047', 'OMERIC 300 MG', 0, 0, 1),
(790, 'REG.02.502', 'MKP PALA 30 ML', 0, 0, 1),
(792, 'REG.02.394', 'IMUNOS SIRUP', 0, 0, 1),
(793, 'REG.02.061', 'APIALIST SIRUP 60 ML', 0, 0, 1),
(794, 'REG.07.85', 'tensi one type 1a', 0, 0, 1),
(795, 'REG.03.1100', 'VOLTADEX 50 MG', 0, 0, 1),
(797, 'REG.02.121', 'BODREXIN FLU & BATUK', 0, 0, 1),
(798, 'REG.02.711', '<NAME>', 0, 0, 1),
(799, 'REG.03.011', 'ACTOS MET 15 MG', 0, 0, 1),
(800, 'REG.02.544', '<NAME>', 0, 0, 1),
(801, 'REG.03.2048', 'NOVAXIFEN 400 MG', 0, 0, 1),
(802, 'REG.03.026', 'ALLORIS', 0, 0, 1),
(803, 'REG.03.882', 'PURICEMIA', 0, 0, 1),
(806, 'REG.07.87', 'TIMBANGAN INJAK AICA 130 KG', 0, 0, 1),
(807, 'REG.07.562', '<NAME>', 0, 0, 1),
(808, 'REG.03.701', 'MOLAZOL TAB', 0, 0, 1),
(810, 'REG.03.1094', 'VITALONG C TUBE', 0, 0, 1),
(811, 'REG.02.821', 'YOU C 1000', 0, 0, 1),
(812, 'REG.05.200', 'DERMATIX ULTRA GEL 7G', 0, 0, 1),
(813, 'REG.05.201', 'DAKTARIN CREAM 5 GR', 0, 0, 1),
(814, 'REG.02.334', 'GANDAPURA LANG 30 ML', 0, 0, 1),
(815, 'REG.03.2049', 'KAPSIDA', 0, 0, 1),
(816, 'REG.02.221', 'COMBANTRIN SYR ORANGE', 0, 0, 1),
(817, 'REG.02.335', 'GANDAPURO LANG 60 ML', 0, 0, 1),
(819, 'REG.05.202', 'VICKS VAPORUP 10 GRAM', 0, 0, 1),
(820, 'REG.03.2050', 'GARCIA', 0, 0, 1),
(821, 'REG.03.2051', 'HABBATUSSAUDA\' KURMA AJWA 100', 0, 0, 1),
(823, 'REG.07.500', 'KOTAK P3K + ISI', 0, 0, 1),
(825, 'REG.03.936', '<NAME>', 0, 0, 1),
(826, 'REG.03.125', '<NAME>', 0, 0, 1),
(827, 'REG.02.102', 'BETADIN 60 ML', 0, 0, 1),
(828, 'REG.02.483', 'MINYAK KAPAK 56 ML', 0, 0, 1),
(829, 'REG.02.481', 'MINYAK KAPAK 14 ML', 0, 0, 1),
(830, 'REG.03.653', '<NAME>', 0, 0, 1),
(831, 'REG.03.896', 'REDOXON ', 0, 0, 1),
(832, 'REG.05.203', '<NAME>', 0, 0, 1),
(834, 'REG.07.577', 'MASKER SKRIINER GIRLY 5\'S', 0, 0, 1),
(835, 'REG.04.073', 'TROPICANA SLIM SWEET DIABET 25S', 0, 0, 1),
(836, 'REG.04.072', 'TROPICANA SLIM SWEET DIABET 50S', 0, 0, 1),
(837, 'REG.05.204', 'TROMBOPHOB OINTMENT', 0, 0, 1),
(839, 'REG.02.056', 'ANTASIDA SYR FM', 0, 0, 1),
(840, 'REG.07.890', 'SAFETY BOX', 0, 0, 1),
(841, 'REG.06.135', 'LEUCOPLAST 1 x 5', 0, 0, 1),
(842, 'REG.06.136', 'SOFRATULLE', 0, 0, 1),
(843, 'REG.07.021', '<NAME>', 0, 0, 1),
(844, 'REG.07.073', 'BOLA TENSI ABN', 0, 0, 1),
(845, 'REG.03.344', 'ETABION', 0, 0, 1),
(846, 'REG.06.137', 'PLESTERIN 10X5 CM', 0, 0, 1),
(847, 'REG.03.1090', '<NAME>', 0, 0, 1),
(848, 'REG.07.1271', 'TERMOMETER DIGITAL', 0, 0, 1),
(849, 'REG.04.070', 'TROPICANA SLIM 50X1', 0, 0, 1),
(850, 'REG.04.071', 'TROPICANA SLIM CLASSIC 25X1 ', 0, 0, 1),
(851, 'REG.02.500', 'MKP LANG 210 ML', 0, 0, 1),
(852, 'REG.03.361', 'FENAREN', 0, 0, 1),
(853, 'REG.03.486', 'HERBAPAIN', 0, 0, 1),
(854, 'REG.05.205', 'VICKS VAPORUB 25 G', 0, 0, 1),
(855, 'REG.02.676', '<NAME>', 0, 0, 1),
(856, 'REG.03.988', 'SUTRA', 0, 0, 1),
(857, 'REG.03.989', '<NAME>', 0, 0, 1),
(858, 'REG.03.1039', 'TROLIP 300 MG', 0, 0, 1),
(859, 'REG.05.070', 'KETRICIN ORABASE 0.1%', 0, 0, 1),
(860, 'REG.03.1105', 'VOMETA ', 0, 0, 1),
(862, 'REG.03.332', 'EPEXOL TAB 30 MG', 0, 0, 1),
(863, 'REG.02.083', '<NAME>', 0, 0, 1),
(864, 'REG.03.2052', 'INCIDAL TAB', 0, 0, 1),
(866, 'REG.07.566', '<NAME>', 0, 0, 1),
(867, 'REG.07.566', '<NAME>', 0, 0, 1),
(869, 'REG.03.304', 'DIVASK 10 MG ', 0, 0, 1),
(870, 'REG.03.602', 'LANCID 20 MG', 0, 0, 1),
(871, 'REG.02.226', 'VICKS F44 54 ML', 0, 0, 1),
(872, 'REG.02.601', 'PIMTAKROL', 0, 0, 1),
(874, 'REG.02.894', '<NAME>', 0, 0, 1),
(875, 'REG.02.556', '<NAME>', 0, 0, 1),
(877, 'REG.05.048', 'FORMYCO ZK', 0, 0, 1),
(878, 'REG.03.2053', '<NAME> ', 0, 0, 1),
(879, 'REG.05.073', 'MEBO ZK', 0, 0, 1),
(881, 'REG.05.186', 'HOTIN CREAM AROMATERAPY 60 GR', 0, 0, 1),
(882, 'REG.05.184', 'HOTIN CREAM 60 GR', 0, 0, 1),
(883, 'REG.02.287', 'EPEXOL SIRUP', 0, 0, 1),
(884, 'REG.07.97', 'CHROM 3/0 + 1/2 GT', 0, 0, 1),
(885, 'REG.02.707', 'SYLEX SIRUP 100 ML', 0, 0, 1),
(886, 'REG.02.809', 'VOMETA SIRUP', 0, 0, 1),
(887, 'REG.02.808', 'VOMETA DROP', 0, 0, 1),
(888, 'REG.03.975', 'STATOR 20 MG', 0, 0, 1),
(889, 'REG.02.896', 'BINTANG 7 MASUK ANGIN', 0, 0, 1),
(891, 'REG.03.363', 'WELMOVE STRIP', 0, 0, 1),
(892, 'REG.02.539', '<NAME>', 0, 0, 1),
(893, 'REG.03.2055', 'FITCOM GUMMY MULTIV BIRU', 0, 0, 1),
(894, 'REG.03.2056', 'FITCOM GUMMY VIT C & ZINC', 0, 0, 1),
(896, 'REG.05.197', 'ENZIM ANAK ORANGE', 0, 0, 1),
(898, 'REG.07.640', 'NEEDLE 23 TERUMO', 0, 0, 1),
(899, 'REG.02.897', 'FASIDOL DROP', 0, 0, 1),
(900, 'REG.07.1132', 'T-SILK 3/0 S21', 0, 0, 1),
(901, 'REG.05.218', 'PRONALGES 100 MG', 0, 0, 1),
(903, 'REG.03.039', 'AMARYL 4M', 0, 0, 1),
(905, 'REG.05.198', 'ENZIM MINT 100 ML ', 0, 0, 1),
(906, 'REG.05.199', 'ENZIM 40+ 100 ML', 0, 0, 1),
(907, 'REG.02.940', 'ENZIM MOUTHWASH 24 ML', 0, 0, 1),
(908, 'REG.07.566', 'MASKER SKRIINER 10\'S', 0, 0, 1),
(909, 'REG.02.898', 'MKP GAJAH 15 ML', 0, 0, 1),
(910, 'REG.03.376', 'FITKOM JERUK 21 TAB', 0, 0, 1),
(911, 'REG.03.377', 'FITKOM STRAWBERRY 21 TAB', 0, 0, 1),
(912, 'REG.02.391', 'IMBOOST SYR 120 ML', 0, 0, 1),
(913, 'REG.02.724', 'STIMUNO STICKC PACK ORANGE', 0, 0, 1),
(914, 'REG.03.2057', 'HERBACOLD TAB', 0, 0, 1),
(916, 'REG.02.244', 'HERBAKOF STICK PACK', 0, 0, 1),
(918, 'REG.02.899', 'NOVAMAG SYR', 0, 0, 1),
(919, 'REG.03.2058', 'BISOLVON TABLET', 0, 0, 1),
(920, 'REG.02.1008', 'BISOLVON EXTRA SYR 60 ML', 0, 0, 1),
(921, 'REG.07.567', '<NAME>', 0, 0, 1),
(922, 'REG.03.664', 'MELOXICAM 7,5 MG', 0, 0, 1),
(923, 'REG.07.568', 'HEATING SET', 0, 0, 1),
(924, 'REG.02.900', '<NAME>', 0, 0, 1),
(925, 'REG.02.767', 'TRIAMINIC EXP 60 ML', 0, 0, 1),
(926, 'REG.05.194', 'COUNTERPAIN 30 GRAM', 0, 0, 1),
(927, 'REG.02.106', 'BETADIN 15 ML', 0, 0, 1),
(929, 'REG.02.963', 'Y-RINS 120ML', 0, 0, 1),
(930, 'REG.02.901', 'RIVANOL 100 ML', 0, 0, 1),
(931, 'REG.06.147', 'HANSAPLAST ROLL 0.5X5', 0, 0, 1),
(932, 'REG.03.1367', 'IMODIUM TAB', 0, 0, 1),
(933, 'REG.02.262', 'Dextrose 40%', 0, 0, 1),
(934, 'REG.01.025', 'ATROPIN SULFAT', 0, 0, 1),
(935, 'REG.02.902', 'MADU BALITA', 0, 0, 1),
(936, 'REG.02.407', '<NAME>', 0, 0, 1),
(937, 'REG.02.499', 'MKP GAJAH 120 ML', 0, 0, 1),
(938, 'REG.03.039', 'AMARYL 4 MG', 0, 0, 1),
(939, 'REG.02.903', '<NAME>', 0, 0, 1),
(940, 'REG.05.155', 'HOTIN STRONG BOTOL 120 ML', 0, 0, 1),
(941, 'REG.02.076', 'ASEPTIC GEL 5 L', 0, 0, 1),
(942, 'REG.03.2059', 'ASMASOLON', 0, 0, 1),
(943, 'REG.02.905', '<NAME>', 0, 0, 1),
(944, 'REG.05.093', '<NAME>', 0, 0, 1),
(945, 'REG.03.2060', '<NAME> & VEGGIE (HIJAU) 5\'S', 0, 0, 1),
(946, 'REG.02.906', 'PEDITOX ', 0, 0, 1),
(947, 'REG.05.023', '<NAME>', 0, 0, 1),
(948, 'REG.03.2061', '<NAME> ', 0, 0, 1),
(949, 'REG.03.832', 'PIROXICAM 10 MG', 0, 0, 1),
(950, 'REG.02.589', 'PARACETAMOL DROP', 0, 0, 1),
(952, 'REG.03.1503', 'RAVALGIN 500 MG', 0, 0, 1),
(953, 'REG.03.1094', '<NAME>', 0, 0, 1),
(954, 'REG.06.148', '<NAME>', 0, 0, 1),
(955, 'REG.03.2062', '<NAME>', 0, 0, 1),
(956, 'REG.02.907', '<NAME> <NAME>', 0, 0, 1),
(957, 'REG.05.200', '<NAME>', 0, 0, 1),
(958, 'REG.01.240', 'NEUROT<NAME>J ', 0, 0, 1),
(959, 'REG.03.2063', 'LEXATRANS', 0, 0, 1),
(960, 'REG.05.108', '<NAME>', 0, 0, 1),
(961, 'REG.02.240', '<NAME>', 0, 0, 1),
(962, 'REG.05.201', '<NAME>', 0, 0, 1),
(963, 'REG.03.313', '<NAME>', 0, 0, 1),
(964, 'REG.02.503', '<NAME>', 0, 0, 1),
(965, 'REG.03.2064', '<NAME>', 0, 0, 1),
(966, 'REG.03.2065', 'ADONA TAB', 0, 0, 1),
(967, 'REG.03.2066', '<NAME>', 0, 0, 1),
(968, 'REG.03.2067', 'PROCOL FLU & BATUK', 0, 0, 1),
(969, 'REG.05.202', 'MELANOX ZK', 0, 0, 1),
(970, 'REG.05.073', 'MEBO', 0, 0, 1),
(972, 'REG.03.392', 'GLUCOSAMIN TAB', 0, 0, 1),
(973, 'REG.02.908', 'HUFAGRIP TMP MERAH', 0, 0, 1),
(974, 'REG.02.381', 'HUFAGRIP PILEK KUNING', 0, 0, 1),
(977, 'REG.05.186', 'HOTIN CREAM AROMATERAPY 60 ML', 0, 0, 1),
(978, 'REG.05.185', 'HOTIN CREAM HOT 120 ML', 0, 0, 1),
(979, 'REG.03.2068', 'FISHERMAN ', 0, 0, 1),
(980, 'REG.06.149', 'KOOL FEVER BAYI', 0, 0, 1),
(981, 'REG.05.203', 'GPU KRIM PALA 60 GR', 0, 0, 1),
(982, 'REG.05.204', 'GPU KRIM JAHE 60 GR', 0, 0, 1),
(983, 'REG.02.908', 'MEA ROSE 60 ML', 0, 0, 1),
(984, 'REG.02.909', 'MEA LAVENDER 60 ML ', 0, 0, 1),
(985, 'REG.02.910', 'MEA GRENTEA 60 ML', 0, 0, 1),
(986, 'REG.03.685', 'MATRIX 3 MG', 0, 0, 1),
(987, 'REG.03.685', 'METRIX 3 MG', 0, 0, 1),
(988, 'REG.04.081', 'HEPATOSOL', 0, 0, 1),
(991, 'REG.02.911', 'MKP LANG PLUS 30 ML', 0, 0, 1),
(992, 'REG.02.912', 'MKP LANG PLUS 60 ML', 0, 0, 1),
(993, 'REG.02.913', 'MKP LANG EUKALIPTUS 60 ML', 0, 0, 1),
(994, 'REG.02.500', 'MKP LANG 210 ML', 0, 0, 1),
(995, 'REG.02.914', 'GPU PALA 30 ML', 0, 0, 1),
(996, 'REG.03.1485', 'DRAMAMIN TAB ', 0, 0, 1),
(997, 'REG.03.2069', '<NAME>', 0, 0, 1),
(998, 'REG.03.398', 'KAPSUL 00', 0, 0, 1),
(999, 'REG.02.915', 'ANTIMO ANAK STRAWBERRY', 0, 0, 1),
(1000, 'REG.02.916', '<NAME>', 0, 0, 1),
(1001, 'REG.02.917', '<NAME>', 0, 0, 1),
(1002, 'REG.02.918', '<NAME>`', 0, 0, 1),
(1003, 'REG.02.919', '<NAME>', 0, 0, 1),
(1004, 'REG.02.920', '<NAME>', 0, 0, 1),
(1005, 'REG.02.921', '<NAME>', 0, 0, 1),
(1006, 'REG.01.425', 'LEVEMIR ', 0, 0, 1),
(1007, 'REG.07.936', '<NAME>', 0, 0, 1),
(1008, 'REG.03.331', 'EPERISON HCL', 0, 0, 1),
(1010, 'REG.07.569', 'SILK 3/0 + 1/2 GT', 0, 0, 1),
(1011, 'REG.03.1131', 'PARATUSIN TAB ', 0, 0, 1),
(1012, 'REG.03.2070', '<NAME> ', 0, 0, 1),
(1013, 'REG.05.205', 'ASEPSO+ REGULER', 0, 0, 1),
(1017, 'REG.02.707', '<NAME>', 0, 0, 1),
(1019, 'REG.03.2033', 'METAMIZOLE SODIUM', 0, 0, 1),
(1020, 'REG.07.570', 'TIMBANG<NAME>DIRI', 0, 0, 1),
(1021, 'REG.07.571', 'OTOSKOP', 0, 0, 1),
(1022, 'REG.07.463', 'jarum jahit heacting', 0, 0, 1),
(1023, 'REG.03.1351', 'NOPERTEN 5MG', 0, 0, 1),
(1024, 'REG.03.539', 'INTIDROL ENSEVAL', 0, 0, 1),
(1025, 'REG.02.691', 'SEDROFEN ENSE', 0, 0, 1),
(1026, 'REG.03.2044', '<NAME>', 0, 0, 1),
(1027, 'REG.03.2072', 'V<NAME>', 0, 0, 1),
(1028, 'REG.02.922', 'OBH BERLICO', 0, 0, 1),
(1029, 'REG.02.923', 'BETADIN 5ML', 0, 0, 1),
(1030, 'REG.05.186', 'HOTIN STROMG 60', 0, 0, 1),
(1031, 'REG.05.002', 'THROMBOFOP 10', 0, 0, 1),
(1032, 'REG.73.575', 'KAPSUL 0', 0, 0, 1),
(1033, 'REG.03.2073', 'NATUR E 16S SMALL PACK', 0, 0, 1),
(1034, 'REG.05.168', 'mometason', 0, 0, 1),
(1035, 'REG.02.924', 'SELTIFORT', 0, 0, 1),
(1036, 'REG.02.925', '<NAME> 250', 0, 0, 1),
(1037, 'REG.02.926', 'MADU SARI 120', 0, 0, 1),
(1038, 'REG.02.927', '<NAME>', 0, 0, 1),
(1039, 'REG.02.928', '<NAME>', 0, 0, 1),
(1040, 'REG.02.929', 'MADU SARI 650', 0, 0, 1),
(1041, 'REG.05.120', 'KALPANAX 5', 0, 0, 1),
(1042, 'REG.03.2074', '<NAME>', 0, 0, 1),
(1043, 'REG.01.027', 'ATS', 0, 0, 1),
(1044, 'REG.02.247', 'D40', 0, 0, 1),
(1045, 'REG.03.2075', 'fitkom gummy vit c dan zinc', 0, 0, 1),
(1046, 'REG.03.272', 'DEXA M', 0, 0, 1),
(1047, 'REG.03.2076', 'LEXAGIN', 0, 0, 1),
(1048, 'REG.03.2077', 'GO FIT GUMMY', 0, 0, 1),
(1050, 'REG.05.198', 'GPU KR SEREH 10GR', 0, 0, 1),
(1051, 'REG.02.930', 'MEA ROSE 30', 0, 0, 1),
(1052, 'REG.73.255', 'curcuma fct cap', 0, 0, 1),
(1054, 'REG.01.295', '<NAME>', 0, 0, 1),
(1055, 'REG.02.724', 'STIMUNO STICK', 0, 0, 1),
(1056, 'REG.07.572', 'MASK<NAME>', 0, 0, 1),
(1057, 'REG.07.112', 'MASKER SURGICAL 3PLY', 0, 0, 1),
(1058, 'REG.07.640', 'NEEDLE 23 ONEMED', 0, 0, 1),
(1059, 'REG.07.573', 'DENTAL FLOSS', 0, 0, 1),
(1060, 'REG.03.2078', 'VITAPLEX', 0, 0, 1),
(1061, 'REG.02.377', '<NAME>', 0, 0, 1),
(1062, 'REG.07.1239', 'STERACAT 20', 0, 0, 1),
(1063, 'REG.07.1237', 'STERACAT 22', 0, 0, 1),
(1064, 'REG.03.2079', 'HISTIGO', 0, 0, 1),
(1065, 'REG.07.567', 'MASKER NEBULE ANAK', 0, 0, 1),
(1066, 'REG.05.188', 'AISHADERM LIGHT DAY CR', 0, 0, 1),
(1067, 'REG.05.189', 'NATASHA LIGHT NIGHT CR', 0, 0, 1),
(1068, 'REG.05.190', 'NATASHA BRIGHT DAY CR', 0, 0, 1),
(1069, 'REG.05.191', 'NATASHA GREEN TEA DAY CR', 0, 0, 1),
(1070, 'REG.02.932', '<NAME>', 0, 0, 1),
(1071, 'REG.05.187', 'AISHADERM HEALTHY MOIST BL', 0, 0, 1),
(1072, 'REG.03.017', 'ADONA', 0, 0, 1),
(1073, 'REG.03.447', 'GLUCOSAMIN TAB', 0, 0, 1),
(1074, 'REG.03.447', 'GLUCOSAMIN TAB', 0, 0, 1),
(1075, 'REG.03.642', 'LOPAMID TAB', 0, 0, 1),
(1076, 'REG.07.574', 'MASKER SENSI', 0, 0, 1),
(1077, 'REG.07.570', 'MASKER HIJAB', 0, 0, 1),
(1078, 'REG.07.575', 'NEEDLE 25', 0, 0, 1),
(1079, 'REG.07.568', 'MASKER OX ANAK', 0, 0, 1),
(1080, 'REG.07.570', 'MASKER OX DEWASA', 0, 0, 1),
(1082, 'REG.06.078', 'U PAD STERIL', 0, 0, 1),
(1083, 'REG.07.361', 'FOLEY CATETER', 0, 0, 1),
(1084, 'REG.04.082', 'TROPICANA SLIM 100', 0, 0, 1),
(1085, 'REG.02.933', '<NAME>', 0, 0, 1),
(1086, 'REG.02.556', '<NAME>', 0, 0, 1),
(1087, 'REG.02.767', 'TRIAMINIC EKSPEKTORAN', 0, 0, 1),
(1088, 'REG.02.833', 'CU<NAME>', 0, 0, 1),
(1089, 'REG.02.391', 'IMBOOST KIDS SYR', 0, 0, 1),
(1090, 'REG.02.724', 'STIMUNO STICK', 0, 0, 1),
(1091, 'REG.02.834', 'PROSIC', 0, 0, 1),
(1092, 'REG.02.960', 'TEMPRA', 0, 0, 1),
(1093, 'REG.02.835', 'POLYSILANE SYR', 0, 0, 1),
(1094, 'REG.02.836', 'KUNYIT ASAM', 0, 0, 1),
(1095, 'REG.02.851', 'QNC GAMAT', 0, 0, 1),
(1096, 'REG.03.1118', '<NAME>', 0, 0, 1),
(1097, 'REG.05.149', 'ALLOCLAIR', 0, 0, 1),
(1098, 'REG.02.103', '<NAME>', 0, 0, 1),
(1099, 'REG.03.046', 'AMINOFILIN', 0, 0, 1),
(1100, 'REG.02.837', '<NAME>', 0, 0, 1),
(1101, 'REG.03.2001', 'FITUNO', 0, 0, 1),
(1102, 'REG.06.141', 'KOOL FEVER SACH', 0, 0, 1),
(1103, 'REG.02.838', 'GPU NUTMEG OIL', 0, 0, 1),
(1104, 'REG.05.198', 'GPU 150 ', 0, 0, 1),
(1105, 'REG.02.839', '<NAME>', 0, 0, 1),
(1106, 'REG.02.840', '<NAME>', 0, 0, 1),
(1107, 'REG.03.2002', '<NAME>', 0, 0, 1),
(1108, 'REG.05.073', 'MEBO', 0, 0, 1),
(1109, 'REG.02.841', '<NAME>', 0, 0, 1),
(1110, 'REG.03.2003', 'CEREBROFORT MIX FUIT FISH OIL', 0, 0, 1),
(1111, 'REG.05.150', '<NAME>', 0, 0, 1),
(1112, 'REG.02.842', 'IFARSYL', 0, 0, 1),
(1113, 'REG.02.843', 'OBH TROPICA EXTRA MENTHOL', 0, 0, 1),
(1114, 'REG.02.879', 'CALLUSOL', 0, 0, 1),
(1115, 'REG.07.565', 'ALTAMED', 0, 0, 1),
(1116, 'REG.07.572', '<NAME>', 0, 0, 1),
(1117, 'REG.03.2004', 'FIMESTAN', 0, 0, 1),
(1118, 'REG.03.2005', 'CDR SWEET EFF 10S', 0, 0, 1),
(1119, 'REG.03.2006', 'CDR EFF ORANGE 15S', 0, 0, 1),
(1120, 'REG.03.2007', 'CURCUMA PLUS GO TAL TAB', 0, 0, 1),
(1121, 'REG.03.2008', '<NAME> 5X10', 0, 0, 1),
(1122, 'REG.02.844', 'VESPERUM', 0, 0, 1),
(1123, 'REG.02.845', '<NAME>', 0, 0, 1),
(1124, 'REG.03.2009', 'LEXIGO', 0, 0, 1),
(1125, 'REG.07.567', '<NAME>', 0, 0, 1),
(1126, 'REG.03.2010', '<NAME>', 0, 0, 1),
(1127, 'REG.03.2011', 'HOLISTICARE EFF ORANGE', 0, 0, 1),
(1128, 'REG.03.2012', '<NAME>', 0, 0, 1),
(1129, 'REG.02.846', 'STIMUNO SYR ORANGE BERRY 100', 0, 0, 1),
(1130, 'REG.05.151', '<NAME>', 0, 0, 1),
(1131, 'REG.03.2013', 'MYCROGYNON', 0, 0, 1),
(1132, 'REG.02.490', '<NAME> 30ML', 0, 0, 1),
(1133, 'REG.07.568', '<NAME>', 0, 0, 1),
(1134, 'REG.03.285', 'DIANE', 0, 0, 1),
(1135, 'REG.05.152', '<NAME>', 0, 0, 1),
(1136, 'REG.03.857', 'PRIMOLUT', 0, 0, 1),
(1137, 'REG.02.880', 'PLOSS<NAME>', 0, 0, 1),
(1138, 'REG.02.881', 'P<NAME>', 0, 0, 1),
(1139, 'REG.02.847', '<NAME>', 0, 0, 1),
(1140, 'REG.02.850', 'GLIMUNOS SYR', 0, 0, 1),
(1141, 'REG.05.030', 'CHIBY BABY BALM CREAM', 0, 0, 1),
(1142, 'REG.05.154', '<NAME>', 0, 0, 1),
(1143, 'REG.02.852', 'MADU EXTRAGA 625', 0, 0, 1),
(1144, 'REG.02.853', 'MADU BALITA 150', 0, 0, 1),
(1145, 'REG.02.854', 'MADU ROYAL JELLY 110', 0, 0, 1),
(1146, 'REG.02.855', 'MADU ROYAL JELLY 150', 0, 0, 1),
(1147, 'REG.02.856', 'MADU ROYAL JELLY 250', 0, 0, 1),
(1148, 'REG.02.857', 'MADU KELENGKENG 150', 0, 0, 1),
(1149, 'REG.02.858', 'MADU KELENGKENG 250', 0, 0, 1),
(1150, 'REG.02.859', 'MADU KELENGKENG 625', 0, 0, 1),
(1151, 'REG.02.860', 'MADU BEE POLLEN 150', 0, 0, 1),
(1152, 'REG.02.861', 'MADU BEE POLLEN 250', 0, 0, 1),
(1153, 'REG.02.862', 'MADU BEE POLLEN 625', 0, 0, 1),
(1154, 'REG.02.863', 'MADU HITAM KALENCENG 150', 0, 0, 1),
(1155, 'REG.02.864', '<NAME> 300', 0, 0, 1),
(1156, 'REG.02.020', 'ALKOHOL 70% 5L', 0, 0, 1),
(1157, 'REG.03.2014', 'THIAMFILEX', 0, 0, 1),
(1158, 'REG.03.2015', 'BIMASTAN', 0, 0, 1),
(1159, 'REG.03.2016', 'DEXAHARSEN 0.5MG', 0, 0, 1),
(1160, 'REG.02.882', 'V FRESH LAVENDER', 0, 0, 1),
(1161, 'REG.02.865', 'MAMO (MNYK ANGIN)', 0, 0, 1),
(1162, 'REG.02.866', 'V FRESH GREEN TEA', 0, 0, 1),
(1163, 'REG.03.2017', '<NAME>', 0, 0, 1),
(1164, 'REG.02.867', 'WOODS HERBAL 60 SYR', 0, 0, 1),
(1165, 'REG.03.2018', 'WO<NAME>', 0, 0, 1),
(1166, 'REG.03.1114', 'WOODS LOZ HONEY LEMON', 0, 0, 1),
(1167, 'REG.03.2019', 'WOODS LOZ ORANGE', 0, 0, 1),
(1168, 'REG.02.087', 'BABY COUGH', 0, 0, 1),
(1169, 'REG.03.2020', '<NAME>', 0, 0, 1),
(1170, 'REG.03.2021', '<NAME>', 0, 0, 1),
(1171, 'REG.04.056', 'PROBIOKID', 0, 0, 1),
(1172, 'REG.03.862', 'PROLIC', 0, 0, 1),
(1173, 'REG.05.065', 'MOLADERM (MICONAZOL)', 0, 0, 1),
(1174, 'REG.02.321', 'FESHCARE SPORT', 0, 0, 1),
(1175, 'REG.02.321', 'FRESHCARE SPORT', 0, 0, 1),
(1176, 'REG.02.493', 'MKP PLUS 30', 0, 0, 1),
(1177, 'REG.02.494', 'MKP PLUS 60', 0, 0, 1),
(1179, 'REG.02.871', 'INFATRIM', 0, 0, 1),
(1180, 'REG.05.166', 'FEXAZOL (KETOCONAZOL)', 0, 0, 1),
(1181, 'REG.05.175', 'CALADIN 60 LOT ML', 0, 0, 1),
(1182, 'REG.03.2022', 'E<NAME>', 0, 0, 1),
(1183, 'REG.03.2023', 'EGOJI CHEWY GUM STRAWBERRY', 0, 0, 1),
(1184, 'REG.02.111', 'BIOLYSIN SMART SYR 60', 0, 0, 1),
(1185, 'REG.03.2024', 'BIOLYSIN KIDS ORANGE TAB', 0, 0, 1),
(1186, 'REG.03.2025', 'BIOLYSIN KIDS STRAW TAB', 0, 0, 1),
(1187, 'REG.03.2026', 'BIOLYSIN KIDS BLACKCURRANT TAB', 0, 0, 1),
(1189, 'REG.02.238', 'CURCUMA PLUS SHARPY STRAW', 0, 0, 1),
(1190, 'REG.02.872', 'CURCUMA PLUS SHARPY BLACKCURR', 0, 0, 1),
(1191, 'REG.02.237', 'CURCUMA PLUS SHARPY ORANGE', 0, 0, 1),
(1192, 'REG.03.2027', 'INFATRIM TAB', 0, 0, 1),
(1193, 'REG.03.091', 'ATORVASTATIN 20 TAB', 0, 0, 1),
(1194, 'REG.06.142', 'LEUCOPLAST 1X2.5 CM', 0, 0, 1),
(1195, 'REG.02.873', 'BETADIN KUMUR 190 ML', 0, 0, 1),
(1196, 'REG.02.092', 'BATUGIN ELIXIR 300', 0, 0, 1),
(1197, 'REG.03.558', '<NAME>', 0, 0, 1),
(1198, 'REG.02.874', '<NAME>', 0, 0, 1),
(1199, 'REG.02.875', '<NAME>', 0, 0, 1),
(1200, 'REG.03.2031', '<NAME>', 0, 0, 1),
(1201, 'REG.02.876', '<NAME>', 0, 0, 1),
(1202, 'REG.02.877', '<NAME>', 0, 0, 1),
(1203, 'REG.07.500', 'KOTAK P3K ', 0, 0, 1),
(1204, 'REG.06.143', 'LEUCOPLAST 1.25X4.5', 0, 0, 1),
(1205, 'REG.02.411', 'IODINE POVIDON 300ML', 0, 0, 1),
(1206, 'REG.03.2028', 'CYLOWAM (CIPRO)', 0, 0, 1),
(1207, 'REG.03.2030', 'FORBONE FORTE (GLUCOSAMIN)', 0, 0, 1);
INSERT INTO `m_obat` (`id`, `kode_obat`, `nama_obat`, `total_qty`, `harga_jual`, `status`) VALUES
(1208, 'REG.02.868', '<NAME>', 0, 0, 1),
(1209, 'REG.02.870', '<NAME>', 0, 0, 1),
(1210, 'REG.02.869', '<NAME>', 0, 0, 1),
(1211, 'REG.02.302', 'FARMACROL FORTE SYR', 0, 0, 1),
(1212, 'REG.02.802', 'VICKS F44 100ML', 0, 0, 1),
(1213, 'REG.03.1102', 'VOLTAREN TAB 50 MG', 0, 0, 1),
(1214, 'REG.06.140', 'LEUCOPLAST 4.5X2.5', 0, 0, 1),
(1215, 'REG.01.083', 'CORTIDEX INJEKSI', 0, 0, 1),
(1216, 'REG.04.082', 'STMJ SUSU', 0, 0, 1),
(1217, 'REG.05.300', 'VICKS VAPORUB 50 GR', 0, 0, 1),
(1218, 'REG.03.2083', 'GALTAREN (NA. DIK) 50MG', 0, 0, 1),
(1219, 'REG.03.2084', 'KONIPID (AMLODIPIN 5 TAB)', 0, 0, 1),
(1220, 'JKN.03.2085', 'DEXA M* (BPJS)', 0, 0, 1),
(1221, 'JKN.03.2086', 'ANTASIDA DOEN* (BPJS)', 0, 0, 1),
(1222, 'JKN.05.98', 'HIDROCORTISON ZK* (BPJS)', 0, 0, 1),
(1223, 'JKN.03.051', 'RANITIDIN TAB* (BPJS)', 0, 0, 1),
(1224, 'JKN.03.2087', 'CAPTOPRIL TAB* (BPJS)', 0, 0, 1),
(1225, 'JKN.03.2088', 'SALBUTAMOL 4 TAB* (BPJS)', 0, 0, 1),
(1226, 'JKN.03.2089', 'METAMIZOL TAB*(BPJS)', 0, 0, 1),
(1227, 'JKN.03.2090', 'CETIRIZIN TAB* (BPJS)', 0, 0, 1),
(1228, 'REG.05.99', 'EN<NAME>', 0, 0, 1),
(1229, 'REG.04.250', '<NAME>', 0, 0, 1),
(1230, '310.02.1009', 'SAFE CARE UECA 5 ML', 0, 0, 1),
(1231, 'REG.02.1009', 'FRESHCARE KAYU PUTIH', 0, 0, 1),
(1232, 'REG.03.2085', 'NASAMEX FORTE', 0, 0, 1),
(1233, '310.07.1451', 'MOR<NAME>', 0, 0, 1),
(1234, 'REG.03.2086', 'CURCUMA FCT', 0, 0, 1),
(1235, 'REG.03.2087', 'VITACIMIN ORANGE ', 0, 0, 1),
(1236, 'REG.02.1010', 'AILIN TM', 0, 0, 1),
(1237, 'REG.02.1011', 'IMBOOST FORCE SYR 120ML', 0, 0, 1),
(1238, 'REG.03.2088', 'STOBLED ', 0, 0, 1),
(1239, 'REG.03.2089', '<NAME>', 0, 0, 1),
(1240, 'REG.03.2090', 'ACRAN 150', 0, 0, 1),
(1241, 'REG.02.1012', 'GPU JAHE 60ML', 0, 0, 1),
(1242, 'REG.02.1013', 'GPU PALA 60ML', 0, 0, 1),
(1244, 'REG.03.2091', 'STATOR 10MG', 0, 0, 1),
(1245, 'REG.07.1451', 'PINSET ANATOMI', 0, 0, 1),
(1246, 'REG.07.1452', 'PINSET CIRUGIS', 0, 0, 1),
(1247, 'REG.02.1015', '<NAME>', 0, 0, 1),
(1248, 'REG.03.2092', 'ANALTRAM', 0, 0, 1),
(1249, 'REG.02.1016', '<NAME>', 0, 0, 1),
(1250, 'REG.04.251', '<NAME> 250GRAM', 0, 0, 1),
(1251, 'REG.04.252', 'GARAM LOSOSA 500GRAM', 0, 0, 1),
(1252, 'REG.07.1453', 'TENSOCRAPE 3\" INCH', 0, 0, 1),
(1253, 'REG.01.885', 'CEFOTAXIME INJ', 0, 0, 1),
(1254, 'REG.07.1454', 'INTROCANT 22', 0, 0, 1),
(1255, 'REG.07.1455', 'INTROCANT 24', 0, 0, 1),
(1256, 'REG.03.2093', '<NAME>', 0, 0, 1),
(1257, 'REG.03.2094', 'FITBON PLUS', 0, 0, 1),
(1258, 'REG.03.2095', 'VOLA TABLET ( DOMPERIDON)', 0, 0, 1),
(1259, 'REG.07.1456', 'FACE MASK CHILD EAR LOOP', 0, 0, 1),
(1260, 'REG.03.2096', 'LAMESON (METHYL)', 0, 0, 1),
(1261, 'REG.02.1017', '<NAME>', 0, 0, 1),
(1262, 'REG.02.1018', '<NAME>', 0, 0, 1),
(1263, 'REG.03.2097', 'CEFILA (CEFIXIM)', 0, 0, 1),
(1264, 'REG.02.1019', '<NAME>', 0, 0, 1),
(1265, 'REG.02.1020', '<NAME>', 0, 0, 1),
(1266, 'REG.02.1021', 'ERLA TM PLUS 5ML', 0, 0, 1),
(1267, 'REG.02.1022', '<NAME>', 0, 0, 1),
(1268, 'REG.03.1349', 'MICARDIS 40 MG/20 TAB', 0, 0, 1),
(1269, 'REG.03.2098', 'ATORVASTATIN 10 MG TAB', 0, 0, 1),
(1270, 'REG.02.1023', '<NAME>', 0, 0, 1),
(1271, 'REG.05.301', 'RHEUMASON CLASIC CREAM', 0, 0, 1),
(1272, 'REG.02.1024', '<NAME> ', 0, 0, 1),
(1273, 'REG.07.1457', '<NAME>1', 0, 0, 1),
(1274, 'REG.07.1458', '<NAME>', 0, 0, 1),
(1275, 'REG.02.1025', '<NAME>', 0, 0, 1),
(1276, 'REG.03.1347', 'MYONEP', 0, 0, 1),
(1277, 'REG.03.2099', 'LAPIFED TABLET', 0, 0, 1),
(1278, 'REG.03.2100', 'OSKOM CAPLET', 0, 0, 1),
(1279, 'REG.05.302', 'SAGESTAM ZK', 0, 0, 1),
(1280, 'REG.05.303', 'ASEPSO SULPHUR', 0, 0, 1),
(1281, 'REG.05.304', 'ASEPSO FRESH', 0, 0, 1),
(1282, 'REG.03.2101', 'ASEPSO CLEAN', 0, 0, 1),
(1283, 'REG.03.2102', 'CETEEM', 0, 0, 1),
(1284, 'REG.07.1459', 'CHKM GIGI', 0, 0, 1),
(1285, 'REG.07.1460', 'SCANDONEST/ SEPTODONT GIGI', 0, 0, 1),
(1286, 'REG.07.1461', 'Z250 XT GIGI', 0, 0, 1),
(1287, 'REG.07.1462', 'NITI 0.16 GIGI', 0, 0, 1),
(1288, 'REG.07.1463', 'POWER O GIGI', 0, 0, 1),
(1289, 'REG.07.1464', 'ELITE CEMENT GIGI', 0, 0, 1),
(1290, 'REG.07.1465', '<NAME>', 0, 0, 1),
(1291, 'REG.07.1466', '<NAME>', 0, 0, 1),
(1292, 'REG.07.1467', '<NAME>', 0, 0, 1),
(1293, 'REG.07.1468', '<NAME>', 0, 0, 1),
(1294, 'REG.07.1469', '<NAME>', 0, 0, 1),
(1295, 'REG.03.2103', 'LEXADIUM (LOPERAMID)', 0, 0, 1),
(1296, 'REG.02.1026', 'STIMUNO ORANGE BERRY 60ML', 0, 0, 1),
(1297, 'REG.02.1027', 'STIMUNO GRAPE 100ML', 0, 0, 1),
(1299, 'REG.03.2105', 'TABLET TAMBAH DARAH KF', 0, 0, 1),
(1300, 'REG.02.1028', '<NAME>', 0, 0, 1),
(1301, 'REG.03.2106', 'LASGAN TAB (ESOME)', 0, 0, 1),
(1302, '310.13.416', 'GABAPENTIN 300 MG TAB', 0, 0, 1),
(1303, 'REG.07.262', 'DISPO 3CC NIPRO', 0, 0, 1),
(1304, 'REG.03.2107', 'RENABETIC (GLIBENCLAMID)', 0, 0, 1),
(1305, 'REG.01.024', 'ASAM TRANEXSAMAT INJ', 0, 0, 1),
(1306, 'REG.02.021', 'DEKTROSE 40%', 0, 0, 1),
(1307, 'REG.03.2108', 'FASTOR 20MG (ATORVASTATIN)', 0, 0, 1),
(1309, 'REG.07.1470', 'TORNIQUET', 0, 0, 1),
(1310, 'REG.02.1029', 'OBH COMBI BF PINK STRAW', 0, 0, 1),
(1311, 'REG.02.1030', 'OBH COMBI BATUK PILEK', 0, 0, 1),
(1312, 'REG.02.1031', 'MEA LAVENDER 30ML', 0, 0, 1),
(1313, 'REG.01.199', 'LAPIBAL INJ (MECOBALAMIN)', 0, 0, 1),
(1314, 'REG.02.1032', 'LAPIMOX FORTE 250 SYR (AMOXICILIN)', 0, 0, 1),
(1315, 'REG.03.2110', '<NAME> (CLINDAMICIN)', 0, 0, 1),
(1317, 'REG.07.1471', '<NAME>', 0, 0, 1),
(1318, 'REG.07.1472', '<NAME>', 0, 0, 1),
(1319, 'REG.02.1033', 'ALLOCLAIR PLUS MOUTHWASH', 0, 0, 1),
(1320, 'REG.02.735', 'TANTUM VERDE 60 ML', 0, 0, 1),
(1321, 'REG.03.1446', 'FASTOR 10 MG (ATORVASTATIN)', 0, 0, 1),
(1322, 'REG.07.1473', 'SILK 2/0 ', 0, 0, 1),
(1323, 'REG.03.2111', 'FITCOM GUMMY MINI - C', 0, 0, 1),
(1324, 'REG.03.2112', 'ACLAM ', 0, 0, 1),
(1325, 'REG.05.305', 'ENZIM ANAK TUTY FRUTY', 0, 0, 1),
(1326, 'REG.02.1034', 'WOODS COUGH SYR 100 ML', 0, 0, 1),
(1327, 'REG.02.1035', 'FITOCARE MTL 50ML', 0, 0, 1),
(1328, 'REG.02.1036', '<NAME> (DOMPERIDON)', 0, 0, 1),
(1329, 'REG.03.2113', 'ALLERGEN (CTM)', 0, 0, 1),
(1330, 'REG.07.1474', 'ALAT TUSUK LANCING ', 0, 0, 1),
(1331, 'REG.03.2114', 'LABALIN (PREGABALIN TAB)', 0, 0, 1),
(1332, 'REG.03.2115', 'TIRIZ (CETIRIZIN TAB)', 0, 0, 1),
(1333, 'REG.03.2116', 'DOM (DOMPERIDON TAB LAPI)', 0, 0, 1),
(1334, 'REG.02.1037', '<NAME> (DOMPERIDON LAPI)', 0, 0, 1),
(1335, 'REG.03.2117', 'LAPISTAN (ASAM MEFENAMAT LAPI)', 0, 0, 1),
(1336, 'REG.02.1038', 'GOTIK (POVIDON 5ML)', 0, 0, 1),
(1337, 'REG.03.2118', 'FERMIA (TAB TAMBAH DARAH)', 0, 0, 1),
(1338, 'REG.02.1039', '<NAME>', 0, 0, 1),
(1339, 'REG.07.1475', '<NAME>', 0, 0, 1),
(1340, 'REG.02.1040', '<NAME> (IBUPROFEN)', 0, 0, 1),
(1341, 'REG.03.392', 'IMUNOS PLUS TAB', 0, 0, 1),
(1342, 'REG.03.2119', '<NAME> (ERDOSTEIN)', 0, 0, 1),
(1343, 'REG.03.2120', '<NAME> (PCT 650)', 0, 0, 1),
(1344, 'REG.02.528', '<NAME> ', 0, 0, 1),
(1345, 'REG.03.700', 'MOLAGIT (DIATAB)', 0, 0, 1),
(1346, 'REG.03.2121', 'VISELA (FOLAT)', 0, 0, 1),
(1347, 'REG.03.2122', '<NAME>(VIT TULANG)', 0, 0, 1),
(1348, 'REG.03.2123', 'MOLEXFLU TAB', 0, 0, 1),
(1349, 'REG.03.2124', 'GRANTUSIF TAB (DEXTRAL)', 0, 0, 1),
(1350, 'REG.03.2125', '<NAME>', 0, 0, 1),
(1351, 'REG.06.150', 'TISSU POCKET HAND', 0, 0, 1),
(1352, 'REG.03.2126', '<NAME>', 0, 0, 1),
(1353, 'REG.03.2127', 'CAL 95', 0, 0, 1),
(1354, 'REG.03.2128', 'HEPATIN', 0, 0, 1),
(1355, 'REG.02.060', 'API<NAME>', 0, 0, 1),
(1356, 'REG.02.1041', 'PRITAMOX (AMOXICILIN) SYR', 0, 0, 1),
(1357, 'REG.02.1042', 'GRALISIN SYR (MULTIV)', 0, 0, 1),
(1358, 'REG.03.2129', 'PRITANOL 100 (ALLOPURINOL)', 0, 0, 1),
(1359, 'REG.03.1251', 'NONEMI', 0, 0, 1),
(1360, 'REG.03.2130', 'CEFADROXIL 250 MG', 0, 0, 1),
(1361, 'REG.03.626', 'PRITAMOX TAB', 0, 0, 1),
(1362, 'REG.07.1476', 'CATETER URO ONE 16', 0, 0, 1),
(1363, 'REG.03.2131', 'SAKATONIK ABC GUMMY F&V', 0, 0, 1),
(1364, 'REG.07.1477', 'OXYFLOW NASAL CANUL', 0, 0, 1),
(1365, 'REG.07.1478', 'ULTRAFIX 10X5', 0, 0, 1),
(1366, 'REG.07.1479', 'INFUSET MIKRO', 0, 0, 1),
(1367, 'REG.02.590', 'PARACETAMOL INF', 0, 0, 1),
(1368, 'REG.01.019', 'OMEPRAZOLE INJ', 0, 0, 1),
(1369, 'REG.01.063', 'CEFTRIAXON INJ', 0, 0, 1),
(1370, 'REG.02.1043', '<NAME>', 0, 0, 1),
(1371, 'REG.02.1044', 'MADU RASA ORIGINAL', 0, 0, 1),
(1372, 'REG.02.320', '<NAME>', 0, 0, 1),
(1373, 'REG.07.1480', 'DERMAFIX IV 6X7 CM', 0, 0, 1),
(1374, 'REG.03.2132', 'GLIKOS (METFORMIN)', 0, 0, 1),
(1375, 'REG.07.1481', '<NAME>', 0, 0, 1),
(1376, 'REG.02.070', 'AQUABIDEST OTSU 25CC', 0, 0, 1),
(1377, 'REG.07.1482', '<NAME>', 0, 0, 1),
(1378, 'REG.02.1045', 'FRESHCARE PRESS N RELAX', 0, 0, 1),
(1379, 'REG.02.1046', 'MTL CITRONELLA ', 0, 0, 1),
(1380, 'REG.05.306', 'HOTIN BALSEM EXTRA HOT', 0, 0, 1),
(1381, 'REG.01.398', 'VIT B1 INJ', 0, 0, 1),
(1382, 'REG.03.2133', 'ZECAMEX (CTM)', 0, 0, 1),
(1383, 'REG.05.307', '<NAME>', 0, 0, 1),
(1384, 'REG.03.2134', 'OSTEOCOM', 0, 0, 1),
(1385, 'REG.02.1047', '<NAME>', 0, 0, 1),
(1386, 'REG.03.2135', 'LAPICEF CAPS (CEFADROXIL)', 0, 0, 1),
(1387, 'REG.02.1048', 'LAPICEF SYR ( CEFADROXIL)', 0, 0, 1),
(1388, 'REG.02.309', 'RING AS SANBE', 0, 0, 1),
(1389, 'REG.02.1049', 'ASEPSO BODY WASH 250ML', 0, 0, 1),
(1390, 'REG.01.886', 'ODR 4MG INJ (ONDANCENTRON)', 0, 0, 1),
(1391, 'REG.07.1483', 'INFLO IV CATH 20', 0, 0, 1),
(1392, 'REG.06.151', 'MEDICRAPE 3\"INC', 0, 0, 1),
(1393, 'REG.06.152', 'MEDICRAPE 6\" INC', 0, 0, 1),
(1394, 'REG.02.1050', 'IMUNOS PLUS SYR', 0, 0, 1),
(1395, 'REG.03.2136', 'GROW VIT', 0, 0, 1),
(1396, 'REG.03.2137', 'GOOD LIFE VIT C 1000 ', 0, 0, 1),
(1397, 'REG.02.1051', 'LAPI<NAME>', 0, 0, 1),
(1398, 'REG.02.1052', 'LAPIMOX SYR 125MG (CEFADROXIL)', 0, 0, 1),
(1399, 'REG.03.2138', 'EYEVIT TABLET', 0, 0, 1),
(1400, 'REG.07.1484', 'SONDE 16', 0, 0, 1),
(1401, 'REG.07.1485', 'ASEPTIC GEL (KF)', 0, 0, 1),
(1402, 'REG.02.1053', 'LAPICEF SYR 125 (CEFADROXIL)', 0, 0, 1),
(1403, 'REG.07.1486', 'MEDICUT GEA 20', 0, 0, 1),
(1404, 'REG.07.1487', 'MEDICUT GEA 22', 0, 0, 1),
(1405, 'REG.07.1488', 'HEACTING SET', 0, 0, 1),
(1406, 'REG.02.1054', '<NAME>', 0, 0, 1),
(1407, 'REG.07.1489', 'ONEMED MOTIF MASK', 0, 0, 1),
(1408, 'REG.02.910', 'INFUSAN D5 1/2', 0, 0, 1),
(1409, 'REG.03.2139', 'SLENDY', 0, 0, 1),
(1410, 'REG.07.1490', 'MASKER CORONA', 0, 0, 1),
(1411, 'REG.02.1055', 'HAND SANITISER 500ML', 0, 0, 1),
(1412, 'REG.07.1491', 'MASK<NAME>A 2 ( 20 )', 0, 0, 1),
(1413, 'REG.02.1056', 'HAND SANITISER FRESCO', 0, 0, 1),
(1414, 'REG.03.2140', '<NAME> ( CETIRIZIN)', 0, 0, 1),
(1415, 'REG.03.2141', 'LASAL 4MG CAPSUL ( SALBUTAMOL)', 0, 0, 1),
(1416, 'REG.02.1057', 'ALKOHOL 70% 300ML', 0, 0, 1),
(1417, 'REG.02.1058', '<NAME>', 0, 0, 1),
(1418, 'REG.07.1492', 'MAYO 80', 0, 0, 1),
(1419, 'REG.02.1059', '<NAME> (ANTASIDA SYR)', 0, 0, 1),
(1420, 'REG.02.1060', 'ONE SCRUB', 0, 0, 1),
(1421, 'REG.07.1493', 'NURSE CAP', 0, 0, 1),
(1422, 'REG.03.012', 'ACYCLOVIR 200* (BPJS)', 0, 0, 1),
(1423, 'REG.02.1061', 'OCTEDIN IKA', 0, 0, 1),
(1424, 'REG.03.053', 'AMOXICILIN TAB * (BP)', 0, 0, 1),
(1425, 'REG.03.635', 'LIVRON TAB* (BP)', 0, 0, 1),
(1426, 'REG.03.025', 'ALLOPURINOL 300 TAB* (BP)', 0, 0, 1),
(1427, 'REG.03.050', 'AMLODIPIN 5MG * (BP)', 0, 0, 1),
(1428, 'REG.03.049', 'AMLODIPIN 10MG* (BP)', 0, 0, 1),
(1429, 'REG.03.080', 'ASAM MEF TAB* (BP)', 0, 0, 1),
(1430, 'REG.03.202', 'CIPROFLOXACIN * (BP)', 0, 0, 1),
(1431, 'REG.03.502', 'IBUPROFEN TAB* (BP)', 0, 0, 1),
(1432, 'REG.02.1062', 'INFUSAN D5', 0, 0, 1),
(1433, 'JKN.03.024', 'ALLOPURINOL 100MG * (BP)', 0, 0, 1),
(1434, 'JKN.03.2091', 'INFATRIM TABLET * (BP)', 0, 0, 1),
(1435, 'JKN.02.304', 'RECO TM * (BP)', 0, 0, 1),
(1436, 'JKN.01.1', 'RECODYL INJ * (BP)', 0, 0, 1),
(1437, 'JKN.03.2092', 'OMEPRAZOL CAPS * (BP)', 0, 0, 1),
(1438, 'JKN.02.305', 'PRITAMOX SYR * (BP)', 0, 0, 1),
(1439, 'JKN.03.2093', 'ALPARA * (BP)', 0, 0, 1),
(1440, 'JKN.03.2094', 'GLIMEPIRID 2MG* (BP)', 0, 0, 1),
(1441, 'JKN.03.2095', 'GLIMEPIRID 4MG* (BP)', 0, 0, 1),
(1442, 'JKN.02.306', 'ANTASIDA SYR* (BP)', 0, 0, 1);
-- --------------------------------------------------------
--
-- Struktur dari tabel `m_pasien`
--
CREATE TABLE `m_pasien` (
`id` int(11) NOT NULL,
`no_pasien` varchar(7) NOT NULL,
`nik` varchar(16) NOT NULL,
`no_bpjs` varchar(20) DEFAULT NULL,
`nama_pasien` varchar(50) NOT NULL,
`jenis` enum('UMUM','BPJS') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `m_pasien`
--
INSERT INTO `m_pasien` (`id`, `no_pasien`, `nik`, `no_bpjs`, `nama_pasien`, `jenis`) VALUES
(4, 'PX00004', '35181304990001', '01R0837249208198', '<NAME>', 'BPJS'),
(7, 'PX00007', '35181302890004', '', '<NAME>', 'UMUM'),
(8, 'PX00008', '3511110901980009', '01R0837249208199', '<NAME>', 'BPJS');
-- --------------------------------------------------------
--
-- Struktur dari tabel `m_supplier`
--
CREATE TABLE `m_supplier` (
`id` int(11) NOT NULL,
`kode_supplier` varchar(6) NOT NULL,
`nama_supplier` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `m_supplier`
--
INSERT INTO `m_supplier` (`id`, `kode_supplier`, `nama_supplier`) VALUES
(1, 'SUP001', 'ANTAR MITRA SEMBADA, PT'),
(2, 'SUP002', 'ANUGERAH PHARMINDO LESTARI, PT'),
(3, 'SUP003', 'ANUGRAH ARGON MEDIKA, PT'),
(4, 'SUP004', 'ANUGRAH MITRA JAYA, PT'),
(5, 'SUP005', 'BINA SAN PRIMA, PT'),
(6, 'SUP006', 'DHARMA INTAN MEDIKA, CV'),
(7, 'SUP007', 'DOS NI ROHA, PT'),
(8, 'SUP008', 'INTI SUMBER HASIL SEMPURNA, PT'),
(9, 'SUP009', 'KEBAYORAN PHARMA, PT'),
(10, 'SUP010', 'DAKONAN MAS, PT'),
(11, 'SUP011', 'ENSEVAL PUTERA MEGATRADING, PT'),
(12, 'SUP012', 'MILLENIUM PHARMACON INT, PT'),
(13, 'SUP013', 'KIMIA FARMA, PT'),
(14, 'SUP014', 'MITRA MEDITAMA ABADI, PT'),
(15, 'SUP015', 'MULTI MEDIKA MAKMUR, PT'),
(16, 'SUP016', 'MERAPI UTAMA PHARMA, PT'),
(17, 'SUP017', 'RAJAWALI NUSINDO, PT'),
(18, 'SUP018', 'SAKAJAJA MAKMUR ABADI, PT'),
(19, 'SUP019', 'SURYA SINERGI SEMESTA, PT'),
(20, 'SUP020', 'MEGAH MEDIKA PHARMA, PT'),
(21, 'SUP021', 'BERKAT KURNIA FARMA, PT'),
(22, 'SUP022', 'PARIT PADANG GLOBAL, PT'),
(23, 'SUP023', 'FARMAHUSADA MILLENNIA, PT');
-- --------------------------------------------------------
--
-- Struktur dari tabel `m_user`
--
CREATE TABLE `m_user` (
`id` int(11) NOT NULL,
`kode_user` varchar(5) DEFAULT NULL,
`nama_user` varchar(50) NOT NULL,
`username` varchar(15) NOT NULL,
`password` varchar(32) NOT NULL,
`id_jabatan` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `m_user`
--
INSERT INTO `m_user` (`id`, `kode_user`, `nama_user`, `username`, `password`, `id_jabatan`) VALUES
(1, 'USR01', 'Dr. <NAME>, Cuy', '<PASSWORD>', '<PASSWORD>', 1),
(2, 'USR02', 'Dr. <NAME>, Mm. Md.', 'errica', '<PASSWORD>', 2),
(12, 'USR12', 'Dr. Sumiati, Sgm. Milo', 'sumiaticuy', '<PASSWORD>00af464c76d713c07ad', 2),
(13, 'USR13', 'Dr. <NAME>', 'wetesjok', '25d55ad283aa400af464c76d713c07ad', 3),
(14, 'USR14', '<NAME>', 'paleppa', '25d55ad283aa400af464c76d713c07ad', 3);
--
-- Trigger `m_user`
--
DELIMITER $$
CREATE TRIGGER `auto_kode_user` BEFORE INSERT ON `m_user` FOR EACH ROW BEGIN
IF NEW.id < 10 THEN
SET NEW.kode_user = CONCAT("USR0",NEW.id);
ELSE
SET NEW.kode_user = CONCAT("USR",NEW.id);
END IF;
END
$$
DELIMITER ;
-- --------------------------------------------------------
--
-- Struktur dari tabel `t_detail_pembelian`
--
CREATE TABLE `t_detail_pembelian` (
`id` int(11) NOT NULL,
`id_pembelian` int(11) NOT NULL,
`id_obat` int(11) NOT NULL,
`id_supplier` int(11) NOT NULL,
`batch` varchar(10) NOT NULL,
`exp_date` date NOT NULL,
`qty` int(5) NOT NULL,
`harga` int(8) NOT NULL,
`sub_total` bigint(13) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `t_detail_pembelian`
--
INSERT INTO `t_detail_pembelian` (`id`, `id_pembelian`, `id_obat`, `id_supplier`, `batch`, `exp_date`, `qty`, `harga`, `sub_total`) VALUES
(5, 15, 1, 1, 'G129100', '2024-07-16', 10, 5300, 53000),
(6, 15, 1, 1, 'G129101', '2024-07-17', 100, 5400, 540000),
(7, 15, 2, 1, 'G129200', '2024-07-16', 100, 10500, 1050000),
(8, 15, 3, 5, 'G129300', '2024-07-16', 100, 7450, 745000),
(9, 15, 3, 5, 'G129301', '2024-07-17', 50, 7450, 372500);
--
-- Trigger `t_detail_pembelian`
--
DELIMITER $$
CREATE TRIGGER `t_detail_pembelian_after_delete` AFTER DELETE ON `t_detail_pembelian` FOR EACH ROW BEGIN
DELETE FROM m_detail_obat WHERE id_obat = OLD.id_obat AND id_supplier = OLD.id_supplier AND batch= OLD.batch;
DELETE FROM t_mutasi WHERE no_transaksi=(SELECT no_transaksi FROM t_pembelian WHERE id = OLD.id_pembelian) AND id_obat = OLD.id_obat AND batch=OLD.batch;
END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `t_detail_pembelian_after_insert` AFTER INSERT ON `t_detail_pembelian` FOR EACH ROW BEGIN
UPDATE t_pembelian SET total_qty = (SELECT SUM(qty) FROM t_detail_pembelian WHERE id_pembelian=NEW.id_pembelian), total_harga= (SELECT SUM(sub_total) FROM t_detail_pembelian WHERE id_pembelian=NEW.id_pembelian) WHERE id=NEW.id_pembelian;
INSERT INTO m_detail_obat VALUES (NULL,NEW.id_obat, NEW.id_supplier, NEW.batch, (SELECT tgl_pembelian FROM t_pembelian WHERE id=NEW.id_pembelian), NEW.exp_date, NEW.harga, NEW.qty, 1);
INSERT INTO t_mutasi VALUES (NULL,(SELECT no_transaksi FROM t_pembelian WHERE id = NEW.id_pembelian), (SELECT tgl_pembelian FROM t_pembelian WHERE id = NEW.id_pembelian), NEW.id_obat, NEW.id_supplier, NEW.batch, 'B', NEW.qty, '', (SELECT total_qty FROM m_obat WHERE id=NEW.id_obat), (SELECT id_user FROM t_pembelian WHERE id=NEW.id_pembelian));
END
$$
DELIMITER ;
-- --------------------------------------------------------
--
-- Struktur dari tabel `t_detail_penjualan`
--
CREATE TABLE `t_detail_penjualan` (
`id` int(11) NOT NULL,
`id_penjualan` int(11) NOT NULL,
`id_detail_obat` int(11) NOT NULL,
`qty` int(6) NOT NULL,
`harga` int(8) NOT NULL,
`sub_total` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Trigger `t_detail_penjualan`
--
DELIMITER $$
CREATE TRIGGER `update_penjualan_after_insert` AFTER INSERT ON `t_detail_penjualan` FOR EACH ROW BEGIN
UPDATE t_penjualan SET total_qty = (SELECT SUM(qty) FROM t_detail_penjualan WHERE id_penjualan=NEW.id_penjualan), total_harga= (SELECT SUM(sub_total) FROM t_detail_penjualan WHERE id_penjualan=NEW.id_penjualan) WHERE id=NEW.id_penjualan;
INSERT INTO t_mutasi VALUES (NULL,(SELECT no_transaksi FROM t_penjualan WHERE id = NEW.id_penjualan), (SELECT tgl_penjualan FROM t_penjualan WHERE id = NEW.id_penjualan), (SELECT id_obat FROM m_detail_obat WHERE id = NEW.id_detail_obat), (SELECT id_supplier FROM m_detail_obat WHERE id = NEW.id_detail_obat), (SELECT batch FROM m_detail_obat WHERE id = NEW.id_detail_obat), 'S', '', NEW.qty, (SELECT total_qty FROM m_obat, m_detail_obat WHERE id=(SELECT id_obat FROM m_detail_obat WHERE id = NEW.id_detail_obat)), (SELECT id_user FROM t_penjualan WHERE id=NEW.id_penjualan));
END
$$
DELIMITER ;
-- --------------------------------------------------------
--
-- Struktur dari tabel `t_detail_resep`
--
CREATE TABLE `t_detail_resep` (
`id` int(11) NOT NULL,
`id_resep` int(11) NOT NULL,
`id_obat` int(11) NOT NULL,
`qty` int(5) NOT NULL,
`id_dosis` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `t_detail_retur_keluar`
--
CREATE TABLE `t_detail_retur_keluar` (
`id` int(11) NOT NULL,
`id_retur` int(11) NOT NULL,
`id_detail_obat` int(11) NOT NULL,
`qty` int(5) NOT NULL,
`keterangan` enum('RUSAK','EXP') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `t_detail_retur_masuk`
--
CREATE TABLE `t_detail_retur_masuk` (
`id` int(11) NOT NULL,
`id_pembelian_obat` int(11) NOT NULL,
`id_obat` int(11) NOT NULL,
`id_supplier` int(11) NOT NULL,
`batch` varchar(10) NOT NULL,
`exp_date` date NOT NULL,
`qty` int(5) NOT NULL,
`harga` int(8) NOT NULL,
`sub_total` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `t_mutasi`
--
CREATE TABLE `t_mutasi` (
`id` int(11) NOT NULL,
`no_transaksi` varchar(10) NOT NULL,
`tgl_transaksi` date NOT NULL,
`id_obat` int(11) NOT NULL,
`id_supplier` int(11) NOT NULL DEFAULT '0',
`batch` varchar(10) NOT NULL,
`jenis` enum('P','B','S','R') NOT NULL,
`masuk` int(11) DEFAULT NULL,
`keluar` int(11) DEFAULT NULL,
`stok` int(11) NOT NULL,
`id_user` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `t_mutasi`
--
INSERT INTO `t_mutasi` (`id`, `no_transaksi`, `tgl_transaksi`, `id_obat`, `id_supplier`, `batch`, `jenis`, `masuk`, `keluar`, `stok`, `id_user`) VALUES
(40, 'TXB0000015', '2020-07-16', 1, 1, 'G129100', 'B', 10, 0, 10, 2),
(41, 'TXB0000015', '2020-07-16', 1, 1, 'G129101', 'B', 100, 0, 110, 2),
(42, 'TXB0000015', '2020-07-16', 2, 1, 'G129200', 'B', 100, 0, 100, 2),
(43, 'TXB0000015', '2020-07-16', 3, 5, 'G129300', 'B', 100, 0, 100, 2),
(44, 'TXB0000015', '2020-07-16', 3, 5, 'G129301', 'B', 50, 0, 150, 2);
-- --------------------------------------------------------
--
-- Struktur dari tabel `t_pembelian`
--
CREATE TABLE `t_pembelian` (
`id` int(11) NOT NULL,
`no_transaksi` varchar(10) NOT NULL,
`tgl_pembelian` date NOT NULL,
`total_qty` int(8) NOT NULL,
`total_harga` int(11) NOT NULL,
`bukti_pembelian` varchar(20) DEFAULT NULL,
`id_user` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `t_pembelian`
--
INSERT INTO `t_pembelian` (`id`, `no_transaksi`, `tgl_pembelian`, `total_qty`, `total_harga`, `bukti_pembelian`, `id_user`) VALUES
(15, 'TXB0000015', '2020-07-16', 360, 2760500, 'img_TXB0000015.png', 2);
-- --------------------------------------------------------
--
-- Struktur dari tabel `t_penjualan`
--
CREATE TABLE `t_penjualan` (
`id` int(11) NOT NULL,
`no_transaksi` varchar(10) NOT NULL,
`tgl_penjualan` date NOT NULL,
`id_resep` int(11) DEFAULT NULL,
`total_qty` int(8) DEFAULT NULL,
`total_harga` int(11) DEFAULT NULL,
`id_user` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `t_resep`
--
CREATE TABLE `t_resep` (
`id` int(11) NOT NULL,
`no_resep` varchar(10) NOT NULL,
`tgl_resep` date NOT NULL,
`id_pasien` int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `t_resep`
--
INSERT INTO `t_resep` (`id`, `no_resep`, `tgl_resep`, `id_pasien`, `id_user`, `status`) VALUES
(8, 'RSP000008', '2020-07-03', 4, 2, 1),
(9, 'RSP000009', '2020-07-01', 4, 2, 1),
(10, 'RSP000010', '2020-07-01', 4, 2, 1);
-- --------------------------------------------------------
--
-- Struktur dari tabel `t_retur`
--
CREATE TABLE `t_retur` (
`id` int(11) NOT NULL,
`no_transaksi` varchar(10) NOT NULL,
`tgl_retur` date NOT NULL,
`total_qty` int(8) NOT NULL,
`total_harga` bigint(13) NOT NULL,
`bukti_retur` varchar(50) NOT NULL,
`id_user` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indeks untuk tabel `m_detail_obat`
--
ALTER TABLE `m_detail_obat`
ADD PRIMARY KEY (`id`),
ADD KEY `id_supplier` (`id_supplier`),
ADD KEY `id_obat` (`id_obat`) USING BTREE;
--
-- Indeks untuk tabel `m_dosis`
--
ALTER TABLE `m_dosis`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `m_jabatan`
--
ALTER TABLE `m_jabatan`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `m_obat`
--
ALTER TABLE `m_obat`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `m_pasien`
--
ALTER TABLE `m_pasien`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `no_pasien` (`no_pasien`);
--
-- Indeks untuk tabel `m_supplier`
--
ALTER TABLE `m_supplier`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `m_user`
--
ALTER TABLE `m_user`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `username` (`username`),
ADD UNIQUE KEY `kode_user` (`kode_user`),
ADD KEY `id_jabatan` (`id_jabatan`);
--
-- Indeks untuk tabel `t_detail_pembelian`
--
ALTER TABLE `t_detail_pembelian`
ADD PRIMARY KEY (`id`),
ADD KEY `id_pembelian_obat` (`id_pembelian`),
ADD KEY `id_obat` (`id_obat`),
ADD KEY `id_supplier` (`id_supplier`);
--
-- Indeks untuk tabel `t_detail_penjualan`
--
ALTER TABLE `t_detail_penjualan`
ADD PRIMARY KEY (`id`),
ADD KEY `id_penjualan` (`id_penjualan`),
ADD KEY `id_detail_obat` (`id_detail_obat`);
--
-- Indeks untuk tabel `t_detail_resep`
--
ALTER TABLE `t_detail_resep`
ADD PRIMARY KEY (`id`),
ADD KEY `id_resep` (`id_resep`),
ADD KEY `id_obat` (`id_obat`),
ADD KEY `id_dosis` (`id_dosis`);
--
-- Indeks untuk tabel `t_detail_retur_keluar`
--
ALTER TABLE `t_detail_retur_keluar`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `id_retur` (`id_retur`),
ADD UNIQUE KEY `id_detail_obat` (`id_detail_obat`);
--
-- Indeks untuk tabel `t_detail_retur_masuk`
--
ALTER TABLE `t_detail_retur_masuk`
ADD PRIMARY KEY (`id`),
ADD KEY `id_pembelian_obat` (`id_pembelian_obat`),
ADD KEY `id_obat` (`id_obat`),
ADD KEY `id_supplier` (`id_supplier`);
--
-- Indeks untuk tabel `t_mutasi`
--
ALTER TABLE `t_mutasi`
ADD PRIMARY KEY (`id`),
ADD KEY `no_transaksi` (`no_transaksi`);
--
-- Indeks untuk tabel `t_pembelian`
--
ALTER TABLE `t_pembelian`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `no_transaksi` (`no_transaksi`),
ADD KEY `id_user` (`id_user`);
--
-- Indeks untuk tabel `t_penjualan`
--
ALTER TABLE `t_penjualan`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `no_transaksi` (`no_transaksi`),
ADD KEY `id_user` (`id_user`);
--
-- Indeks untuk tabel `t_resep`
--
ALTER TABLE `t_resep`
ADD PRIMARY KEY (`id`),
ADD KEY `id_pasien` (`id_pasien`),
ADD KEY `id_user` (`id_user`);
--
-- Indeks untuk tabel `t_retur`
--
ALTER TABLE `t_retur`
ADD PRIMARY KEY (`id`),
ADD KEY `id_user` (`id_user`);
--
-- AUTO_INCREMENT untuk tabel yang dibuang
--
--
-- AUTO_INCREMENT untuk tabel `m_detail_obat`
--
ALTER TABLE `m_detail_obat`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT untuk tabel `m_dosis`
--
ALTER TABLE `m_dosis`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT untuk tabel `m_jabatan`
--
ALTER TABLE `m_jabatan`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT untuk tabel `m_obat`
--
ALTER TABLE `m_obat`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1443;
--
-- AUTO_INCREMENT untuk tabel `m_pasien`
--
ALTER TABLE `m_pasien`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT untuk tabel `m_supplier`
--
ALTER TABLE `m_supplier`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
--
-- AUTO_INCREMENT untuk tabel `m_user`
--
ALTER TABLE `m_user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT untuk tabel `t_detail_pembelian`
--
ALTER TABLE `t_detail_pembelian`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT untuk tabel `t_detail_penjualan`
--
ALTER TABLE `t_detail_penjualan`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `t_detail_resep`
--
ALTER TABLE `t_detail_resep`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `t_detail_retur_keluar`
--
ALTER TABLE `t_detail_retur_keluar`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `t_detail_retur_masuk`
--
ALTER TABLE `t_detail_retur_masuk`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `t_mutasi`
--
ALTER TABLE `t_mutasi`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;
--
-- AUTO_INCREMENT untuk tabel `t_pembelian`
--
ALTER TABLE `t_pembelian`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT untuk tabel `t_penjualan`
--
ALTER TABLE `t_penjualan`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT untuk tabel `t_resep`
--
ALTER TABLE `t_resep`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT untuk tabel `t_retur`
--
ALTER TABLE `t_retur`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<filename>src/main/resources/migrate/5.sql<gh_stars>0
SET FOREIGN_KEY_CHECKS=0;
-- stolpe
INSERT INTO materialer (id,name,details,pris) VALUES (1,'stolpe','97x97 mm. trykimp. Stolpe',40);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (1,3000);
-- spær/rem
INSERT INTO materialer (id,name,details,pris) VALUES (21,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (21,2400);
INSERT INTO materialer (id,name,details,pris) VALUES (22,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (22,2700);
INSERT INTO materialer (id,name,details,pris) VALUES (23,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (23,3000);
INSERT INTO materialer (id,name,details,pris) VALUES (24,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (24,3300);
INSERT INTO materialer (id,name,details,pris) VALUES (25,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (25,3600);
INSERT INTO materialer (id,name,details,pris) VALUES (26,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (26,3900);
INSERT INTO materialer (id,name,details,pris) VALUES (27,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (27,4200);
INSERT INTO materialer (id,name,details,pris) VALUES (28,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (28,4500);
INSERT INTO materialer (id,name,details,pris) VALUES (29,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (29,4800);
INSERT INTO materialer (id,name,details,pris) VALUES (30,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (30,5100);
INSERT INTO materialer (id,name,details,pris) VALUES (31,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (31,5400);
INSERT INTO materialer (id,name,details,pris) VALUES (32,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (32,5700);
INSERT INTO materialer (id,name,details,pris) VALUES (33,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (33,6000);
INSERT INTO materialer (id,name,details,pris) VALUES (34,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (34,6300);
INSERT INTO materialer (id,name,details,pris) VALUES (35,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (35,6600);
INSERT INTO materialer (id,name,details,pris) VALUES (36,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (36,6900);
INSERT INTO materialer (id,name,details,pris) VALUES (37,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (37,7200);
INSERT INTO materialer (id,name,details,pris) VALUES (38,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (38,7500);
INSERT INTO materialer (id,name,details,pris) VALUES (39,'spær/rem','45x195 mm. spærtræ ubh.',70);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (39,7800);
-- understern
INSERT INTO materialer (id,name,details,pris) VALUES (51,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (51,2400);
INSERT INTO materialer (id,name,details,pris) VALUES (52,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (52,2700);
INSERT INTO materialer (id,name,details,pris) VALUES (53,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (53,3000);
INSERT INTO materialer (id,name,details,pris) VALUES (54,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (54,3300);
INSERT INTO materialer (id,name,details,pris) VALUES (55,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (55,3600);
INSERT INTO materialer (id,name,details,pris) VALUES (56,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (56,3900);
INSERT INTO materialer (id,name,details,pris) VALUES (57,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (57,4200);
INSERT INTO materialer (id,name,details,pris) VALUES (58,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (58,4500);
INSERT INTO materialer (id,name,details,pris) VALUES (59,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (59,4800);
INSERT INTO materialer (id,name,details,pris) VALUES (60,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (60,5100);
INSERT INTO materialer (id,name,details,pris) VALUES (61,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (61,5400);
INSERT INTO materialer (id,name,details,pris) VALUES (62,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (62,5700);
INSERT INTO materialer (id,name,details,pris) VALUES (63,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (63,6000);
INSERT INTO materialer (id,name,details,pris) VALUES (64,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (64,6300);
INSERT INTO materialer (id,name,details,pris) VALUES (65,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (65,6600);
INSERT INTO materialer (id,name,details,pris) VALUES (66,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (66,6900);
INSERT INTO materialer (id,name,details,pris) VALUES (67,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (67,7200);
INSERT INTO materialer (id,name,details,pris) VALUES (68,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (68,7500);
INSERT INTO materialer (id,name,details,pris) VALUES (69,'understern','25x200 mm. trykimp. Brædt',30);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (69,7800);
-- overstern
INSERT INTO materialer (id,name,details,pris) VALUES (71,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (71,2400);
INSERT INTO materialer (id,name,details,pris) VALUES (72,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (72,2700);
INSERT INTO materialer (id,name,details,pris) VALUES (73,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (73,2500);
INSERT INTO materialer (id,name,details,pris) VALUES (74,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (74,3300);
INSERT INTO materialer (id,name,details,pris) VALUES (75,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (75,3600);
INSERT INTO materialer (id,name,details,pris) VALUES (76,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (76,3900);
INSERT INTO materialer (id,name,details,pris) VALUES (77,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (77,4200);
INSERT INTO materialer (id,name,details,pris) VALUES (78,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (78,4500);
INSERT INTO materialer (id,name,details,pris) VALUES (79,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (79,4800);
INSERT INTO materialer (id,name,details,pris) VALUES (80,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (80,5100);
INSERT INTO materialer (id,name,details,pris) VALUES (81,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (81,5400);
INSERT INTO materialer (id,name,details,pris) VALUES (82,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (82,5700);
INSERT INTO materialer (id,name,details,pris) VALUES (83,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (83,6000);
INSERT INTO materialer (id,name,details,pris) VALUES (84,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (84,6300);
INSERT INTO materialer (id,name,details,pris) VALUES (85,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (85,6600);
INSERT INTO materialer (id,name,details,pris) VALUES (86,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (86,6900);
INSERT INTO materialer (id,name,details,pris) VALUES (87,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (87,7200);
INSERT INTO materialer (id,name,details,pris) VALUES (88,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (88,7500);
INSERT INTO materialer (id,name,details,pris) VALUES (89,'overstern','25x125mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (89,7800);
-- brædt
INSERT INTO materialer (id,name,details,pris) VALUES (100,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (100,1800);
INSERT INTO materialer (id,name,details,pris) VALUES (101,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (101,2100);
INSERT INTO materialer (id,name,details,pris) VALUES (102,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (102,2400);
INSERT INTO materialer (id,name,details,pris) VALUES (103,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (103,2700);
INSERT INTO materialer (id,name,details,pris) VALUES (104,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (104,2500);
INSERT INTO materialer (id,name,details,pris) VALUES (105,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (105,3300);
INSERT INTO materialer (id,name,details,pris) VALUES (106,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (106,3600);
INSERT INTO materialer (id,name,details,pris) VALUES (107,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (107,3900);
INSERT INTO materialer (id,name,details,pris) VALUES (108,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (108,4200);
INSERT INTO materialer (id,name,details,pris) VALUES (109,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (109,4500);
INSERT INTO materialer (id,name,details,pris) VALUES (110,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (110,4800);
INSERT INTO materialer (id,name,details,pris) VALUES (111,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (111,5100);
INSERT INTO materialer (id,name,details,pris) VALUES (112,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (112,5400);
INSERT INTO materialer (id,name,details,pris) VALUES (113,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (113,5700);
INSERT INTO materialer (id,name,details,pris) VALUES (114,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (114,6000);
INSERT INTO materialer (id,name,details,pris) VALUES (115,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (115,6300);
INSERT INTO materialer (id,name,details,pris) VALUES (116,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (116,6600);
INSERT INTO materialer (id,name,details,pris) VALUES (117,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (117,6900);
INSERT INTO materialer (id,name,details,pris) VALUES (118,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (118,7200);
INSERT INTO materialer (id,name,details,pris) VALUES (119,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (119,7500);
INSERT INTO materialer (id,name,details,pris) VALUES (120,'brædt','19x100 mm. trykimp. Brædt',25);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (120,7800);
-- reglar
INSERT INTO materialer (id,name,details,pris) VALUES (140,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (140,1800);
INSERT INTO materialer (id,name,details,pris) VALUES (141,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (141,2100);
INSERT INTO materialer (id,name,details,pris) VALUES (142,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (142,2400);
INSERT INTO materialer (id,name,details,pris) VALUES (143,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (143,2700);
INSERT INTO materialer (id,name,details,pris) VALUES (144,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (144,2700);
INSERT INTO materialer (id,name,details,pris) VALUES (145,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (145,3300);
INSERT INTO materialer (id,name,details,pris) VALUES (146,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (146,3600);
INSERT INTO materialer (id,name,details,pris) VALUES (147,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (147,3900);
INSERT INTO materialer (id,name,details,pris) VALUES (148,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (148,4200);
INSERT INTO materialer (id,name,details,pris) VALUES (149,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (149,4500);
INSERT INTO materialer (id,name,details,pris) VALUES (150,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (150,4800);
INSERT INTO materialer (id,name,details,pris) VALUES (151,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (151,5100);
INSERT INTO materialer (id,name,details,pris) VALUES (152,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (152,5400);
INSERT INTO materialer (id,name,details,pris) VALUES (153,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (153,5700);
INSERT INTO materialer (id,name,details,pris) VALUES (154,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (154,6000);
INSERT INTO materialer (id,name,details,pris) VALUES (155,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (155,6300);
INSERT INTO materialer (id,name,details,pris) VALUES (156,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (156,6600);
INSERT INTO materialer (id,name,details,pris) VALUES (157,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (157,6900);
INSERT INTO materialer (id,name,details,pris) VALUES (158,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (158,7200);
INSERT INTO materialer (id,name,details,pris) VALUES (159,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (159,7500);
INSERT INTO materialer (id,name,details,pris) VALUES (160,'reglar','45x95 mm. Reglar ub.',27);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (160,7800);
-- trapez plader
INSERT INTO materialer (id,name,details,pris) VALUES (170,'trapez','Plastmo Ecolite blåtonet',40);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (170,3600);
INSERT INTO materialer (id,name,details,pris) VALUES (171,'trapez','Plastmo Ecolite blåtonet',40);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (171,6000);
-- lægte
INSERT INTO materialer (id,name,details,pris) VALUES (172,'lægte','38x73 mm. Lægte ubh.',42);
INSERT INTO volumematerialer (volumeMaterialeId,length) VALUES (172,3600);
-- ----------------------------
-- Table structure for properties
-- ----------------------------
DROP TABLE IF EXISTS `properties`;
CREATE TABLE `properties` (
name varchar(255) NOT NULL,
value varchar(255) NOT NULL,
PRIMARY KEY (name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for properties
-- ----------------------------
DROP TABLE IF EXISTS `properties`;
CREATE TABLE `properties` (
name varchar(255) NOT NULL,
value varchar(255) NOT NULL,
PRIMARY KEY (name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of properties
-- ----------------------------
BEGIN;
INSERT INTO `properties` VALUES ('version', '5');
SET FOREIGN_KEY_CHECKS=1;
|
DELETE FROM DrawEntries;
UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='DrawEntries';
INSERT INTO DrawEntries ([DrawId], [EntrantId], [RegisteredOn])
SELECT dr.Id AS [ DrawId ], e.Id AS [ EntrantId ], DATETIME('now')
FROM "Data" AS d
LEFT JOIN Entrants AS e ON e.Code = d.Identificacion
LEFT JOIN Draws AS dr ON dr.Name = d.Provincia; |
use [master]
go
create or alter proc dbo.sp_OutputMultilineTextToFileSystemObject
@MultiLineText varchar( max ),
@DirectoryLocation sysname,
@FsoName sysname,
@EscapeAfterMinutes tinyint = 1
/************************************************************************************************
-- Description : save Multi Line Text from user input to a flat file
-- initial purpose is to build XML docs for Selenium IDE, also useful for CSV output when you're lazy
-- init code plagiarized largely from the below locations.
-- http://www.sqlservercentral.com/blogs/querying-microsoft-sql-server/2013/09/19/how-to-split-a-string-by-delimited-char-in-sql-server/
-- https://msdn.microsoft.com/en-us/library/ms175046.aspx?f=255&MSPPError=-2147217396#Anchor_6
-- Date Developer Issue# Description
--------------- ------------------- ------------------------------------------------------------
-- 2016-01-05 petervandivier DAT-2925 create proc
-- 2016-03-19 petervandivier DAT-3516 rtrim() & escape " in @SingleLineText.
-- 2018-12-07 petervandivier add support for single line (by appending linefeed lololo)
--***********************************************************************************************
-- TESTING FRAMEWORK
exec dbo.sp_OutputMultilineTextToFileSystemObject
@MultiLineText =
'<tr>
<td>open</td>
<td>/home.do</td>
<td></td>
</tr>
<tr>',
@DirectoryLocation = 'c:\',
@FsoName = 'var_out.txt';
exec dbo.sp_OutputMultilineTextToFileSystemObject
@MultiLineText =
'Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
Phasellus fermentum libero vitae tincidunt malesuada.
Aenean id mi in diam luctus molestie.
Quisque elementum porta arcu,
nec dapibus purus ornare eu.
Donec vitae mauris purus.
Fusce sagittis tempor sem,
dignissim venenatis ante hendrerit non. ',
@DirectoryLocation = 'c:\',
@FsoName = 'var_out.txt';
*/
as
begin
set nocount on;
set tran isolation level read uncommitted;
-- declare vars
declare
@Start int,
@End int,
@Delimiter char( 1 ),
@CrLf char( 2 ),
@Cr char( 1 ),
@Lf char( 1 ),
@Cmd varchar( 8000 ),
@SingleLineText varchar( 8000 ),
@i int,
@StartTime datetime;
-- init vars
select
@Start = 1,
@Delimiter = char( 10 ),
@CrLf = char( 13 ) + char( 10 ),
@Cr = char( 13 ),
@Lf = char( 10 ),
@i = 1,
@StartTime = getdate();
-- standardize line feeds for all line breaks
select @MultiLineText = replace( @MultiLineText, @CrLf, @Delimiter );
select @MultiLineText = replace( @MultiLineText, @Cr, @Delimiter );
-- trim doublequotes (invalid char) from FSO targets so we can...
select
@DirectoryLocation = replace( @DirectoryLocation, '"', '' ),
@FsoName = replace( @FsoName, '"', '' );
-- escape spaces in FSO targets
select
@DirectoryLocation = replace( @DirectoryLocation, ' ', '" "' ),
@FsoName = replace( @FsoName, ' ', '" "' );
-- validate filepath
if right( @DirectoryLocation, 1 ) <> '\'
set @DirectoryLocation += '\';
select @End = charindex( @Delimiter, @MultiLineText );
-- escape if text is single line
if @End = 0
begin;
select @MultiLineText += @Delimiter;
select @End = charindex( @Delimiter, @MultiLineText );
end;
select @SingleLineText = substring( @MultiLineText, @Start, @End - @Start );
select @SingleLineText = rtrim( @SingleLineText );
/****************************/
/* Write Output to File */
/****************************/
while @Start < len( @MultiLineText ) + 1
begin
if @End = 0
set @End = len( @MultiLineText ) + 1;
if datediff( minute, @StartTime, getdate() ) > @EscapeAfterMinutes goto FailForTime;
set @SingleLineText = substring( @MultiLineText, @Start, @End - @Start );
select @SingleLineText = rtrim( @SingleLineText );
-- escape spec chars
set @SingleLineText = replace( @SingleLineText, '^', '^^' );
set @SingleLineText = replace( @SingleLineText, '<', '^<' );
set @SingleLineText = replace( @SingleLineText, '>', '^>' );
set @SingleLineText = replace( @SingleLineText, '&', '^&' );
set @SingleLineText = replace( @SingleLineText, '\', '^\' );
set @SingleLineText = replace( @SingleLineText, '|', '^|' );
set @SingleLineText = replace( @SingleLineText, '"', '^"' );
-- initialize the file with the first line
if @i = 1
set @Cmd = 'echo ' + @SingleLineText + ' > ' + @DirectoryLocation + @FsoName
-- append all subsequent lines
else
set @Cmd = 'echo ' + @SingleLineText + ' >> ' + @DirectoryLocation + @FsoName;
-- measure whitespace + horizontal-tab
if datalength( ltrim( rtrim( replace( @SingleLineText, char( 9 ), '' ) ) ) ) = 0
begin
if @i = 1
set @Cmd = 'echo( > ' + @DirectoryLocation + @FsoName
else
set @Cmd = 'echo( >> ' + @DirectoryLocation + @FsoName;
end;
exec [master].dbo.xp_cmdshell @Cmd, no_output;
--print 'exec [master].dbo.xp_cmdshell ''' + @Cmd + ''';';
set @Start = @End + 1;
set @End = charindex( @Delimiter, @MultiLineText, @Start );
set @i += 1;
end;
return 0;
FailForTime:
begin
declare @FailMsg varchar( 1000 ) = 'Proc execution exceeded ' + convert( varchar, @EscapeAfterMinutes ) + ' minute(s) and was escaped. ' + convert( varchar( 10 ), isnull( @i, -1 ) ) + ' line(s) written.';
raiserror( @FailMsg, 11, -1 );
return -1;
end;
end;
go
|
<filename>utility-procs/u_findTable.sql
USE AdventureWorks2012
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME = 'u_findtable')
DROP PROCEDURE dbo.u_findtable
GO
/*
Example usage:
EXEC dbo.u_findtable '%TransactionHistoryA%'
*/
CREATE PROC dbo.u_findtable
@partialName NVARCHAR(128)
AS
BEGIN
SELECT
ss.name+'.'+st.name [fqTableName]
INTO #results
FROM sys.tables st
INNER JOIN sys.schemas ss ON ss.schema_id = st.schema_id
WHERE st.name like @partialname
DECLARE @resultCount INT = (SELECT COUNT(*) FROM #results)
IF @resultCount = 0
BEGIN
SELECT 'No Tables Found'
END
IF @resultCount =1
BEGIN
DECLARE @name NVARCHAR(128) = (SELECT r.[fqTableName] FROM #results r )
EXEC sp_help @name
END
IF @resultCount > 1
BEGIN
SELECT [fqTableName]
FROM #results
END
END
|
<gh_stars>1-10
-- Create indices that are present in production.
-- Up
CREATE INDEX action_key_IDX ON action (`key`, user_id);
CREATE INDEX action_action_time_IDX USING BTREE ON action (action_time);
CREATE INDEX chart_idx_is_fork ON chart (is_fork);
CREATE INDEX chart_author USING BTREE ON chart (author_id);
CREATE INDEX chart_in_folder_IDX USING BTREE ON chart (in_folder);
CREATE INDEX chart_organization_id_IDX USING BTREE ON chart (organization_id);
CREATE INDEX chart_type_IDX USING BTREE ON chart (type);
CREATE INDEX chart_deleted_IDX USING BTREE ON chart (deleted);
CREATE INDEX chart_last_modified_at_IDX USING BTREE ON chart (last_modified_at);
CREATE INDEX chart_forkable_IDX USING BTREE ON chart (forkable);
CREATE INDEX chart_external_data_IDX USING BTREE ON chart (external_data);
CREATE INDEX chart_last_edit_step_IDX USING BTREE ON chart (last_edit_step);
CREATE INDEX chart_guest_session_IDX USING BTREE ON chart (guest_session);
CREATE INDEX export_job_created_at_IDX USING BTREE ON export_job (created_at);
CREATE INDEX export_job_status_IDX USING BTREE ON export_job (status);
CREATE INDEX export_job_key_IDX USING BTREE ON export_job (`key`);
CREATE INDEX export_job_priority_IDX USING BTREE ON export_job (priority);
CREATE INDEX last_updated ON session (last_updated);
CREATE INDEX session_user_id_IDX USING BTREE ON session (user_id);
CREATE INDEX session_persistent_IDX USING BTREE ON session (persistent);
CREATE INDEX created_at ON user (created_at);
CREATE INDEX user_email_IDX USING BTREE ON user (email);
CREATE INDEX user_oauth_signin_IDX USING BTREE ON user (oauth_signin);
-- Down
DROP INDEX action_key_IDX ON action;
DROP INDEX action_action_time_IDX ON action;
DROP INDEX chart_idx_is_fork ON chart;
DROP INDEX chart_author ON chart;
DROP INDEX chart_in_folder_IDX ON chart;
DROP INDEX chart_organization_id_IDX ON chart;
DROP INDEX chart_type_IDX ON chart;
DROP INDEX chart_deleted_IDX ON chart;
DROP INDEX chart_last_modified_at_IDX ON chart;
DROP INDEX chart_forkable_IDX ON chart;
DROP INDEX chart_external_data_IDX ON chart;
DROP INDEX chart_last_edit_step_IDX ON chart;
DROP INDEX chart_guest_session_IDX ON chart;
DROP INDEX export_job_created_at_IDX ON export_job;
DROP INDEX export_job_status_IDX ON export_job;
DROP INDEX export_job_key_IDX ON export_job;
DROP INDEX export_job_priority_IDX ON export_job;
DROP INDEX last_updated ON session;
DROP INDEX session_user_id_IDX ON session;
DROP INDEX session_persistent_IDX ON session;
DROP INDEX created_at ON user;
DROP INDEX user_email_IDX ON user;
DROP INDEX user_oauth_signin_IDX ON user;
|
<gh_stars>1-10
CREATE DATABASE flag_tickets;
USE flag_tickets;
CREATE TABLE tickets (
id INT(11) AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(100),
description TEXT,
severity INT(11),
created_at TIMESTAMP,
done BIT
);
|
SELECT NAME
FROM CITY
WHERE COUNTRYCODE = 'JPN'
|
select uid as uid,
sno as sno,
password as password,
name as name,
class_name as className,
mobile as mobile,
round as round,
status as status,
created_time as created_time,
updated_time as updated_time
from join_info
where updated_time >= :sql_last_value
|
<filename>public_html/administrator/components/com_admin/sql/updates/sqlazure/3.4.0-2015-02-26.sql
INSERT INTO [#__postinstall_messages] ([extension_id], [title_key], [description_key], [action_key], [language_extension], [language_client_id], [type], [action_file], [action], [condition_file], [condition_method], [version_introduced], [enabled])
SELECT 700, 'COM_CPANEL_MSG_LANGUAGEACCESS340_TITLE', 'COM_CPANEL_MSG_LANGUAGEACCESS340_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/languageaccess340.php', 'admin_postinstall_languageaccess340_condition', '3.4.1', 1;
|
<reponame>cbinding/SENESCHAL
SELECT DISTINCT
cg.cla_gr_uid AS scheme_id,
trim(cg.name) AS title,
trim(cg.description) AS description,
'English Heritage' AS attributionName,
'http://www.english-heritage.org.uk' AS attributionURL,
'http://creativecommons.org/licenses/by/3.0' AS licenseURL,
'http://data.ordnancesurvey.co.uk/id/country/england' AS coverage,
'http://www.english-heritage.org.uk' AS publisher,
strftime('%Y-%m-%dT%H:%M:%S', datetime('now')) AS issued
FROM classification_groups cg
WHERE cg.cla_gr_uid IN ('560'); |
<filename>First Part/05 -Gittest/13 -Revision/tpvideoclub.sql
DROP DATABASE IF EXISTS video_club;
CREATE DATABASE video_club;
USE video_club;
CREATE TABLE IF NOT EXISTS `Types`
(
`type_id` INT(10) NOT NULL AUTO_INCREMENT,
`type_name` VARCHAR(50) NOT NULL,
`type_public` VARCHAR(50) NOT NULL,
CONSTRAINT PK_Type PRIMARY KEY (`type_id`)
)
ENGINE = InnoDB
CHARSET utf8
COLLATE utf8_general_ci;
CREATE TABLE IF NOT EXISTS `Movies`
(
`movie_title` VARCHAR(50) NOT NULL,
`movie_director` VARCHAR(100) NOT NULL,
`movie_duration` SMALLINT(3) NOT NULL,
CONSTRAINT PK_movies PRIMARY KEY(`movie_title`, `movie_director`)
)
ENGINE = InnoDB
CHARSET utf8
COLLATE utf8_general_ci;
CREATE TABLE IF NOT EXISTS `Actors`
(
`actor_name` VARCHAR(50) NOT NULL,
`actor_firstname` VARCHAR(50) NOT NULL,
`actor_birth` DATE,
`actor_sex` VARCHAR(20),
CONSTRAINT PK_actors PRIMARY KEY(`actor_name`, `actor_firstname`, `actor_birth`)
)
ENGINE = InnoDB
CHARSET utf8
COLLATE utf8_general_ci;
CREATE TABLE IF NOT EXISTS `Tapes`
(
`tape_id` INT(10) NOT NULL AUTO_INCREMENT,
`tape_registration` DATETIME NOT NULL,
`tape_state` VARCHAR(50) NOT NULL,
CONSTRAINT PK_tapes PRIMARY KEY (`tape_id`)
)
ENGINE = InnoDB
CHARSET utf8
COLLATE utf8_general_ci;
CREATE TABLE IF NOT EXISTS `Addresses`
(
`address_id` INT(10) NOT NULL AUTO_INCREMENT,
`address_zipcode` CHAR(5) NOT NULL,
`address_city` VARCHAR(50) NOT NULL,
`address_number` VARCHAR(10),
`address_street_name` VARCHAR(100) NOT NULL,
CONSTRAINT PK_addresses PRIMARY KEY (`address_id`)
)
ENGINE = InnoDB
CHARSET utf8
COLLATE utf8_general_ci;
CREATE TABLE IF NOT EXISTS `Clients`
(
`client_id` INT(10) NOT NULL AUTO_INCREMENT,
`client_name` VARCHAR(50) NOT NULL,
`client_firstname` VARCHAR(50) NOT NULL,
`client_enrollment` DATETIME NOT NULL,
`client_deposit` TINYINT(3),
CONSTRAINT PK_clients PRIMARY KEY (`client_id`)
)
ENGINE = InnoDB
CHARSET utf8
COLLATE utf8_general_ci;
CREATE TABLE IF NOT EXISTS `Shops`
(
`shop_name` VARCHAR(50) NOT NULL,
`address_id` INT(10) NOT NULL,
CONSTRAINT FK_address_to_shop FOREIGN KEY (`address_id`) REFERENCES `Addresses`(`address_id`),
CONSTRAINT PK_shops PRIMARY KEY (`shop_name`, `address_id`)
)
ENGINE = InnoDB
CHARSET utf8
COLLATE utf8_general_ci;
CREATE TABLE IF NOT EXISTS `Visit`
(
`client_id` INT(10) NOT NULL,
`shop_name` VARCHAR(50) NOT NULL,
`address_id` INT(10) NOT NULL,
CONSTRAINT FK_client_to_visit FOREIGN KEY (`client_id`) REFERENCES `Clients`(`client_id`),
CONSTRAINT FK_shop_to_visit FOREIGN KEY (`shop_name`, `address_id`) REFERENCES `Shops`(`shop_name`, `address_id`),
CONSTRAINT PK_visit PRIMARY KEY (`client_id`, `shop_name`, `address_id`)
)
ENGINE = InnoDB
CHARSET utf8
COLLATE utf8_general_ci;
CREATE TABLE IF NOT EXISTS `Contain`
(
`tape_id` INT(10) NOT NULL,
`shop_name` VARCHAR(50) NOT NULL,
`address_id` INT(10) NOT NULL,
CONSTRAINT FK_tape_to_contain FOREIGN KEY (`tape_id`) REFERENCES `Tapes`(`tape_id`),
CONSTRAINT FK_shop_to_contain FOREIGN KEY (`shop_name`, `address_id`) REFERENCES Shops(`shop_name`, `address_id`),
CONSTRAINT PK_contain PRIMARY KEY (`tape_id`, `shop_name`, `address_id`)
)
ENGINE = InnoDB
CHARSET utf8
COLLATE utf8_general_ci;
CREATE TABLE IF NOT EXISTS `Play`
(
`actor_name` VARCHAR(50) NOT NULL,
`actor_firstname` VARCHAR(50) NOT NULL,
`actor_birth` DATE,
`movie_title` VARCHAR(50) NOT NULL,
`movie_director` VARCHAR(100) NOT NULL,
CONSTRAINT FK_actor_to_play FOREIGN KEY (`actor_name`, `actor_firstname`, `actor_birth`) REFERENCES `Actors`(`actor_name`, `actor_firstname`, `actor_birth`),
CONSTRAINT FK_movie_to_play FOREIGN KEY (`movie_title`, `movie_director`) REFERENCES `Movies`(`movie_title`, `movie_director`),
CONSTRAINT PK_play PRIMARY KEY (`actor_name`, `actor_firstname`, `actor_birth`, `movie_title`, `movie_director`)
)
ENGINE = InnoDB
CHARSET utf8
COLLATE utf8_general_ci;
CREATE TABLE `Borrow`
(
`client_id` INT(10) NOT NULL,
`tape_id` INT(10) NOT NULL,
`borrow_start` DATETIME NOT NULL,
`borrow_end` DATETIME,
CONSTRAINT FK_client_to_borrow FOREIGN KEY (`client_id`) REFERENCES `Clients`(`client_id`),
CONSTRAINT FK_tape_to_borrow FOREIGN KEY (`tape_id`) REFERENCES `Tapes`(`tape_id`),
CONSTRAINT PK_borrow PRIMARY KEY (`client_id`, `tape_id`)
)
ENGINE = InnoDB
CHARSET utf8
COLLATE utf8_general_ci; |
<reponame>anubra266/codebase
--! Previous: sha1:9e66afb870e70c734f28c17329558af2b4698dab
--! Hash: sha1:84478640560051dc938a7e0b8c05a605a2db1f17
-- Enter migration here
CREATE OR REPLACE FUNCTION upsert_questionnaire_to_neo4j() RETURNS TRIGGER AS $$
BEGIN
PERFORM graphile_worker.add_job(
'upsertQuestionToNeo4j',
json_build_object('questionnaireId', NEW.id)
);
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
DROP TRIGGER IF EXISTS upsert_questionnaire_to_neo4j_on_questionnaire_create ON public.questionnaire;
CREATE TRIGGER upsert_questionnaire_to_neo4j_on_questionnaire_create
BEFORE
INSERT ON questionnaire
FOR EACH ROW EXECUTE PROCEDURE upsert_questionnaire_to_neo4j();
DROP TRIGGER IF EXISTS upsert_questionnaire_to_neo4j_on_questionnaire_update ON public.questionnaire;
CREATE TRIGGER upsert_questionnaire_to_neo4j_on_questionnaire_update
BEFORE
UPDATE ON questionnaire
FOR EACH ROW EXECUTE PROCEDURE upsert_questionnaire_to_neo4j();
|
<filename>modules/core/db/update/postgres/02/02-320-updateWfProcIndex.sql<gh_stars>0
--$Id$--
--
CREATE OR REPLACE FUNCTION create_constraint_if_not_exists (
t_name text, c_name text, constraint_sql text)
returns void AS
$$
begin
-- Look for our constraint
if exists (select constraint_name
from information_schema.constraint_column_usage
where table_name = t_name and constraint_name = c_name) then
execute constraint_sql;
end if;
end;
$$
LANGUAGE plpgsql^
DROP INDEX IF EXISTS IDX_WF_PROC_UNIQ_CODE^
SELECT create_constraint_if_not_exists(
'wf_proc',
'wf_proc_uniq_code',
'ALTER TABLE wf_proc DROP CONSTRAINT wf_proc_uniq_code;')^
CREATE UNIQUE INDEX IDX_WF_PROC_UNIQ_CODE ON WF_PROC (CODE) WHERE DELETE_TS IS NULL^
DROP FUNCTION IF EXISTS create_constraint_if_not_exists()^ |
--Задание.
--1. Написать запрос получение всех продуктов с типом "СЫР"
--2. Написать запрос получения всех продуктов, у кого в имени есть слово "мороженное"
--3. Написать запрос, который выводит все продукты, срок годности которых заканчивается в следующем месяце.
--4. Написать запрос, который выводит самый дорогой продукт.
--5. Написать запрос, который выводит количество всех продуктов определенного типа.
--6. Написать запрос получение всех продуктов с типом "СЫР" и "МОЛОКО"
--7. Написать запрос, который выводит тип продуктов, которых осталось меньше 10 штук.
--8. Вывести все продукты и их тип.
--product(id, name, type_id, expired_date, price)
--type(id, name)
create database shop;
create table type(
id serial primary key,
name varchar(100)
);
create table product(
id serial primary key,
name varchar(100),
type_id int references type(id),
expired_date date,
price int
);
insert into type(name) values('СЫР'),('МОЛОКО'),('ФРУКТЫ'),('ОВОЩИ'),('МОРОЖЕНОЕ');
insert into product(name, type_id, expired_date, price)
values('Простоквашино', 2, '25/5/2019', 70)
,('Домик в деревне', 2, '1/6/2019', 60)
,('Бананы', 3, '10/5/2019', 55)
,('Картошка', 4, '8/9/2019', 63)
,('Апельсины', 3, '2/5/2019', 96)
,('Российский', 1, '12/5/2019', 110)
,('Свекла', 4, '6/7/2019', 40)
,('Морковь', 4, '8/8/2019', 15)
,('Ламбер', 1, '14/5/2019', 200)
,('Эдам', 1, '30/4/2019', 160)
,('мороженое Эскимо', 5, '26/4/2019', 35)
,('мороженое 48 копеек', 5, '28/4/2019', 85);
--1. Написать запрос получение всех продуктов с типом "СЫР"
select p.id, p.name, p.expired_date, t.name as type, p.price
from product as p join type as t
on p.type_id=t.id
where upper(t.name) = 'СЫР';
--2. Написать запрос получения всех продуктов, у кого в имени есть слово "мороженное"
select * from product where name like '%мороженое%';
--3. Написать запрос, который выводит все продукты, срок годности которых заканчивается в следующем месяце.
select * from product where EXTRACT(month FROM expired_date)=EXTRACT(month FROM now()) + 1;
--4. Написать запрос, который выводит самый дорогой продукт.
select * from product where price=(select MAX(price) from product);
--5. Написать запрос, который выводит количество всех продуктов определенного типа.
select t.name, count(p.id)
from product as p join type as t
on p.type_id=t.id
where upper(t.name) = 'ОВОЩИ'
group by t.name;
--6. Написать запрос получение всех продуктов с типом "СЫР" и "МОЛОКО"
select p.id, p.name, p.expired_date, t.name as type, p.price
from product as p join type as t
on p.type_id=t.id
where upper(t.name) = 'СЫР' or upper(t.name) = 'МОЛОКО';
--7. Написать запрос, который выводит тип продуктов, которых осталось меньше 3 штук.
select t.name as "Name of type", count(p.name) as "Count of products"
from product as p join type as t
on p.type_id=t.id
group by t.name
HAVING count(p.name)<3
order by t.name;
--8. Вывести все продукты и их тип.
select p.name, t.name as type
from product as p join type as t
on p.type_id=t.id
|
<gh_stars>0
{% test fewer_rows_than(model, compare_model) %}
{{
return(
adapter.dispatch("test_fewer_rows_than", "dbt_utils")(model, compare_model)
)
}}
{% endtest %}
{% macro default__test_fewer_rows_than(model, compare_model) %}
{{ config(fail_calc="coalesce(row_count_delta, 0)") }}
with
a as (select count(*) as count_our_model from {{ model }}),
b as (select count(*) as count_comparison_model from {{ compare_model }}),
counts as (select count_our_model, count_comparison_model from a cross join b),
final as (
select
*,
case
-- fail the test if we have more rows than the reference model and
-- return the row count delta
when count_our_model > count_comparison_model
then (count_our_model - count_comparison_model)
-- fail the test if they are the same number
when count_our_model = count_comparison_model
then 1
-- pass the test if the delta is positive (i.e. return the number 0)
else 0
end as row_count_delta
from counts
)
select *
from final
{% endmacro %}
|
with base as (
select *
from {{ ref('stg_dbt__artifacts') }}
),
run_results as (
select *
from base
where artifact_type = 'run_results.json'
),
dbt_run as (
select *
from run_results
where data:args:which = 'test'
),
fields as (
select
dbt_run.command_invocation_id,
dbt_run.dbt_cloud_run_id,
dbt_run.generated_at as artifact_generated_at,
coalesce(dbt_run.data:args:full_refresh, 'false')::boolean as was_full_refresh,
result.value:unique_id::string as node_id,
split(result.value:thread_id::string, '-')[1]::integer as thread_id,
result.value:status::string as status,
result.value:message::string as message,
-- The first item in the timing array is the test-level `compile`
result.value:timing[0]:started_at::timestamp_ntz as compile_started_at,
-- The second item in the timing array is `execute`.
result.value:timing[1]:completed_at::timestamp_ntz as query_completed_at,
-- Confusingly, this does not match the delta of the above two timestamps.
-- should we calculate it instead?
coalesce(result.value:execution_time::float, 0) as total_node_runtime,
result.value:adapter_response:rows_affected::int as rows_affected
from dbt_run,
lateral flatten(input => data:results) as result
),
surrogate_key as (
select
{{ dbt_utils.surrogate_key(['command_invocation_id', 'node_id']) }} as test_execution_id,
command_invocation_id,
dbt_cloud_run_id,
artifact_generated_at,
was_full_refresh,
node_id,
thread_id,
status,
message,
compile_started_at,
query_completed_at,
total_node_runtime,
rows_affected
from fields
)
select * from surrogate_key
|
<filename>conf/evolutions/solarcalculator/1.sql
# --- !Ups
CREATE TABLE IF NOT EXISTS utilities (
id BIGINT(20) NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
state varchar(2) NOT NULL,
sum_of_customers INT NOT NULL,
sum_of_sales BIGINT(20) NOT NULL,
sum_of_revenues BIGINT(20) NOT NULL,
average_kwh_per_user DECIMAL,
cost FLOAT NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS cost_by_states (
state varchar(2) NOT NULL,
sum_of_customers INT NOT NULL,
sum_of_sales BIGINT(20) NOT NULL,
sum_of_revenues BIGINT(20) NOT NULL,
average_kwh_per_user DECIMAL,
cost FLOAT NOT NULL,
PRIMARY KEY (state)
);
CREATE TABLE IF NOT EXISTS solar_yields (
zip_code INT NOT NULL,
ac_monthly_1 FLOAT,
ac_monthly_2 FLOAT,
ac_monthly_3 FLOAT,
ac_monthly_4 FLOAT,
ac_monthly_5 FLOAT,
ac_monthly_6 FLOAT,
ac_monthly_7 FLOAT,
ac_monthly_8 FLOAT,
ac_monthly_9 FLOAT,
ac_monthly_10 FLOAT,
ac_monthly_11 FLOAT,
ac_monthly_12 FLOAT,
ac_annual FLOAT,
solrad_annual FLOAT,
capacity_factor FLOAT,
PRIMARY KEY(zip_code)
);
# srec in dollar/megawatts
CREATE TABLE IF NOT EXISTS SRECs (
state VARCHAR(2) NOT NULL,
srec INT NOT NULL,
PRIMARY KEY(state)
);
CREATE TABLE IF NOT EXISTS system_costs (
state VARCHAR(2) NOT NULL,
low FLOAT NOT NULL,
high FLOAT NOT NULL,
PRIMARY KEY(state)
);
# --- !Downs
DROP TABLE IF EXISTS utility;
DROP TABLE IF EXISTS solar_yields;
DROP TABLE IF EXISTS cost_by_states;
DROP TABLE IF EXISTS SREC;
DROP TABLE IF EXISTS system_cost;
|
<gh_stars>1000+
set hive.cbo.enable=true;
create table cbo_t1(key string, value string, c_int int, c_float float, c_boolean boolean) partitioned by (dt string) row format delimited fields terminated by ',' STORED AS TEXTFILE;
load data local inpath '${hiveconf:test.data.dir}/cbo_t1.txt' into table cbo_t1 partition (dt='2014');
analyze table cbo_t1 partition (dt) compute statistics;
analyze table cbo_t1 compute statistics for columns key, value, c_int, c_float, c_boolean;
|
set enable_partition_rules = off;
-- partition_list_index.sql
-- Test partition with CREATE INDEX
DROP TABLE if exists mpp3033a;
DROP TABLE if exists mpp3033b;
CREATE TABLE mpp3033a (
unique1 int4,
unique2 int4,
two int4,
four int4,
ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
odd int4,
even int4,
stringu1 name,
stringu2 name,
string4 name
) distributed by (unique1) partition by list (unique1) (
partition aa values (1,2,3,4,5,6,7,8,9,10),
partition bb values (11,12,13,14,15,16,17,18,19,20),
default partition default_part
);
CREATE TABLE mpp3033b (
unique1 int4,
unique2 int4,
two int4,
four int4,
ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
odd int4,
even int4,
stringu1 name,
stringu2 name,
string4 name
) distributed by (unique1) partition by list (unique1)
subpartition by list (unique2)
(
partition aa values (1,2,3,4,5,6,7,8,9,10) (subpartition cc values (1,2,3), subpartition dd values (4,5,6) ),
partition bb values (11,12,13,14,15,16,17,18,19,20) (subpartition cc values (1,2,3), subpartition dd values (4,5,6) )
);
alter table mpp3033b add default partition default_part;
\copy mpp3033a from 'data/onek.data';
\copy mpp3033b from 'data/onek.data';
CREATE INDEX mpp3033a_unique1 ON mpp3033a USING btree(unique1 int4_ops);
CREATE INDEX mpp3033a_unique2 ON mpp3033a USING btree(unique2 int4_ops);
CREATE INDEX mpp3033a_hundred ON mpp3033a USING btree(hundred int4_ops);
CREATE INDEX mpp3033a_stringu1 ON mpp3033a USING btree(stringu1 name_ops);
CREATE INDEX mpp3033b_unique1 ON mpp3033b USING btree(unique1 int4_ops);
CREATE INDEX mpp3033b_unique2 ON mpp3033b USING btree(unique2 int4_ops);
CREATE INDEX mpp3033b_hundred ON mpp3033b USING btree(hundred int4_ops);
CREATE INDEX mpp3033b_stringu1 ON mpp3033b USING btree(stringu1 name_ops);
select count(*) from mpp3033a;
select count(*) from mpp3033b;
reindex index mpp3033a_unique1;
reindex index mpp3033a_unique2;
reindex index mpp3033a_hundred;
reindex index mpp3033a_stringu1;
reindex index mpp3033b_unique1;
reindex index mpp3033b_unique2;
reindex index mpp3033b_hundred;
reindex index mpp3033b_stringu1;
select count(*) from mpp3033a;
select count(*) from mpp3033b;
drop index mpp3033a_unique1;
drop index mpp3033a_unique2;
drop index mpp3033a_hundred;
drop index mpp3033a_stringu1;
drop index mpp3033b_unique1;
drop index mpp3033b_unique2;
drop index mpp3033b_hundred;
drop index mpp3033b_stringu1;
CREATE INDEX mpp3033a_unique1 ON mpp3033a (unique1);
CREATE INDEX mpp3033a_unique2 ON mpp3033a (unique2);
CREATE INDEX mpp3033a_hundred ON mpp3033a (hundred);
CREATE INDEX mpp3033a_stringu1 ON mpp3033a (stringu1);
CREATE INDEX mpp3033b_unique1 ON mpp3033b (unique1);
CREATE INDEX mpp3033b_unique2 ON mpp3033b (unique2);
CREATE INDEX mpp3033b_hundred ON mpp3033b (hundred);
CREATE INDEX mpp3033b_stringu1 ON mpp3033b (stringu1);
select count(*) from mpp3033a;
select count(*) from mpp3033b;
reindex index mpp3033a_unique1;
reindex index mpp3033a_unique2;
reindex index mpp3033a_hundred;
reindex index mpp3033a_stringu1;
reindex index mpp3033b_unique1;
reindex index mpp3033b_unique2;
reindex index mpp3033b_hundred;
reindex index mpp3033b_stringu1;
select count(*) from mpp3033a;
select count(*) from mpp3033b;
drop index mpp3033a_unique1;
drop index mpp3033a_unique2;
drop index mpp3033a_hundred;
drop index mpp3033a_stringu1;
drop index mpp3033b_unique1;
drop index mpp3033b_unique2;
drop index mpp3033b_hundred;
drop index mpp3033b_stringu1;
CREATE UNIQUE INDEX mpp3033a_unique1 ON mpp3033a (unique1);
CREATE UNIQUE INDEX mpp3033a_unique2 ON mpp3033a (unique2);
CREATE UNIQUE INDEX mpp3033a_hundred ON mpp3033a (hundred);
CREATE UNIQUE INDEX mpp3033a_stringu1 ON mpp3033a (stringu1);
CREATE UNIQUE INDEX mpp3033b_unique1 ON mpp3033b (unique1);
CREATE UNIQUE INDEX mpp3033b_unique2 ON mpp3033b (unique2);
CREATE UNIQUE INDEX mpp3033b_hundred ON mpp3033b (hundred);
CREATE UNIQUE INDEX mpp3033b_stringu1 ON mpp3033b (stringu1);
select count(*) from mpp3033a;
select count(*) from mpp3033b;
reindex index mpp3033a_unique1;
reindex index mpp3033a_unique2;
reindex index mpp3033a_hundred;
reindex index mpp3033a_stringu1;
reindex index mpp3033b_unique1;
reindex index mpp3033b_unique2;
reindex index mpp3033b_hundred;
reindex index mpp3033b_stringu1;
select count(*) from mpp3033b;
drop index mpp3033a_unique1;
drop index mpp3033a_unique2;
drop index mpp3033a_hundred;
drop index mpp3033a_stringu1;
drop index mpp3033b_unique1;
drop index mpp3033b_unique2;
drop index mpp3033b_hundred;
drop index mpp3033b_stringu1;
CREATE INDEX mpp3033a_unique1 ON mpp3033a USING bitmap (unique1);
CREATE INDEX mpp3033a_unique2 ON mpp3033a USING bitmap (unique2);
CREATE INDEX mpp3033a_hundred ON mpp3033a USING bitmap (hundred);
CREATE INDEX mpp3033a_stringu1 ON mpp3033a USING bitmap (stringu1);
CREATE INDEX mpp3033b_unique1 ON mpp3033b USING bitmap (unique1);
CREATE INDEX mpp3033b_unique2 ON mpp3033b USING bitmap (unique2);
CREATE INDEX mpp3033b_hundred ON mpp3033b USING bitmap (hundred);
CREATE INDEX mpp3033b_stringu1 ON mpp3033b USING bitmap (stringu1);
select count(*) from mpp3033a;
select count(*) from mpp3033b;
reindex index mpp3033a_unique1;
reindex index mpp3033a_unique2;
reindex index mpp3033a_hundred;
reindex index mpp3033a_stringu1;
reindex index mpp3033b_unique1;
reindex index mpp3033b_unique2;
reindex index mpp3033b_hundred;
reindex index mpp3033b_stringu1;
select count(*) from mpp3033a;
select count(*) from mpp3033b;
-- partition_range_index.sql
-- Test partition with CREATE INDEX
DROP TABLE if exists mpp3033a;
DROP TABLE if exists mpp3033b;
CREATE TABLE mpp3033a (
unique1 int4,
unique2 int4,
two int4,
four int4,
ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
odd int4,
even int4,
stringu1 name,
stringu2 name,
string4 name
) distributed by (unique1) partition by range (unique1)
( partition aa start (0) end (1000) every (100), default partition default_part );
CREATE TABLE mpp3033b (
unique1 int4,
unique2 int4,
two int4,
four int4,
ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
odd int4,
even int4,
stringu1 name,
stringu2 name,
string4 name
) distributed by (unique1) partition by range (unique1)
subpartition by range (unique2) subpartition template ( start (0) end (1000) every (500) )
( start (0) end (1000) every (200));
alter table mpp3033b add default partition default_part;
\copy mpp3033a from 'data/onek.data';
\copy mpp3033b from 'data/onek.data';
drop index if exists mpp3033a_unique1;
drop index if exists mpp3033a_unique2;
drop index if exists mpp3033a_hundred;
drop index if exists mpp3033a_stringu1;
drop index if exists mpp3033b_unique1;
drop index if exists mpp3033b_unique2;
drop index if exists mpp3033b_hundred;
drop index if exists mpp3033b_stringu1;
CREATE INDEX mpp3033a_unique1 ON mpp3033a USING btree(unique1 int4_ops);
CREATE INDEX mpp3033a_unique2 ON mpp3033a USING btree(unique2 int4_ops);
CREATE INDEX mpp3033a_hundred ON mpp3033a USING btree(hundred int4_ops);
CREATE INDEX mpp3033a_stringu1 ON mpp3033a USING btree(stringu1 name_ops);
CREATE INDEX mpp3033b_unique1 ON mpp3033b USING btree(unique1 int4_ops);
CREATE INDEX mpp3033b_unique2 ON mpp3033b USING btree(unique2 int4_ops);
CREATE INDEX mpp3033b_hundred ON mpp3033b USING btree(hundred int4_ops);
CREATE INDEX mpp3033b_stringu1 ON mpp3033b USING btree(stringu1 name_ops);
select count(*) from mpp3033a;
select count(*) from mpp3033b;
reindex index mpp3033a_unique1;
reindex index mpp3033a_unique2;
reindex index mpp3033a_hundred;
reindex index mpp3033a_stringu1;
reindex index mpp3033b_unique1;
reindex index mpp3033b_unique2;
reindex index mpp3033b_hundred;
reindex index mpp3033b_stringu1;
select count(*) from mpp3033a;
select count(*) from mpp3033b;
drop index mpp3033a_unique1;
drop index mpp3033a_unique2;
drop index mpp3033a_hundred;
drop index mpp3033a_stringu1;
drop index mpp3033b_unique1;
drop index mpp3033b_unique2;
drop index mpp3033b_hundred;
drop index mpp3033b_stringu1;
CREATE INDEX mpp3033a_unique1 ON mpp3033a (unique1);
CREATE INDEX mpp3033a_unique2 ON mpp3033a (unique2);
CREATE INDEX mpp3033a_hundred ON mpp3033a (hundred);
CREATE INDEX mpp3033a_stringu1 ON mpp3033a (stringu1);
CREATE INDEX mpp3033b_unique1 ON mpp3033b (unique1);
CREATE INDEX mpp3033b_unique2 ON mpp3033b (unique2);
CREATE INDEX mpp3033b_hundred ON mpp3033b (hundred);
CREATE INDEX mpp3033b_stringu1 ON mpp3033b (stringu1);
select count(*) from mpp3033a;
select count(*) from mpp3033b;
reindex index mpp3033a_unique1;
reindex index mpp3033a_unique2;
reindex index mpp3033a_hundred;
reindex index mpp3033a_stringu1;
reindex index mpp3033b_unique1;
reindex index mpp3033b_unique2;
reindex index mpp3033b_hundred;
reindex index mpp3033b_stringu1;
select count(*) from mpp3033a;
select count(*) from mpp3033b;
drop index mpp3033a_unique1;
drop index mpp3033a_unique2;
drop index mpp3033a_hundred;
drop index mpp3033a_stringu1;
drop index mpp3033b_unique1;
drop index mpp3033b_unique2;
drop index mpp3033b_hundred;
drop index mpp3033b_stringu1;
CREATE UNIQUE INDEX mpp3033a_unique1 ON mpp3033a (unique1);
CREATE UNIQUE INDEX mpp3033a_unique2 ON mpp3033a (unique2);
CREATE UNIQUE INDEX mpp3033a_hundred ON mpp3033a (hundred);
CREATE UNIQUE INDEX mpp3033a_stringu1 ON mpp3033a (stringu1);
CREATE UNIQUE INDEX mpp3033b_unique1 ON mpp3033b (unique1);
CREATE UNIQUE INDEX mpp3033b_unique2 ON mpp3033b (unique2);
CREATE UNIQUE INDEX mpp3033b_hundred ON mpp3033b (hundred);
CREATE UNIQUE INDEX mpp3033b_stringu1 ON mpp3033b (stringu1);
select count(*) from mpp3033a;
select count(*) from mpp3033b;
reindex index mpp3033a_unique1;
reindex index mpp3033a_unique2;
reindex index mpp3033a_hundred;
reindex index mpp3033a_stringu1;
reindex index mpp3033b_unique1;
reindex index mpp3033b_unique2;
reindex index mpp3033b_hundred;
reindex index mpp3033b_stringu1;
select count(*) from mpp3033a;
select count(*) from mpp3033b;
drop index mpp3033a_unique1;
drop index mpp3033a_unique2;
drop index mpp3033a_hundred;
drop index mpp3033a_stringu1;
drop index mpp3033b_unique1;
drop index mpp3033b_unique2;
drop index mpp3033b_hundred;
drop index mpp3033b_stringu1;
CREATE INDEX mpp3033a_unique1 ON mpp3033a USING bitmap (unique1);
CREATE INDEX mpp3033a_unique2 ON mpp3033a USING bitmap (unique2);
CREATE INDEX mpp3033a_hundred ON mpp3033a USING bitmap (hundred);
CREATE INDEX mpp3033a_stringu1 ON mpp3033a USING bitmap (stringu1);
CREATE INDEX mpp3033b_unique1 ON mpp3033b USING bitmap (unique1);
CREATE INDEX mpp3033b_unique2 ON mpp3033b USING bitmap (unique2);
CREATE INDEX mpp3033b_hundred ON mpp3033b USING bitmap (hundred);
CREATE INDEX mpp3033b_stringu1 ON mpp3033b USING bitmap (stringu1);
select count(*) from mpp3033a;
select count(*) from mpp3033b;
reindex index mpp3033a_unique1;
reindex index mpp3033a_unique2;
reindex index mpp3033a_hundred;
reindex index mpp3033a_stringu1;
reindex index mpp3033b_unique1;
reindex index mpp3033b_unique2;
reindex index mpp3033b_hundred;
reindex index mpp3033b_stringu1;
select count(*) from mpp3033a;
select count(*) from mpp3033b;
create table mpp6379(a int, b date, primary key (a,b)) distributed by (a) partition by range (b) (partition p1 end ('2009-01-02'::date));
insert into mpp6379( a, b ) values( 1, '20090101' );
insert into mpp6379( a, b ) values( 1, '20090101' );
alter table mpp6379 add partition p2 end(date '2009-01-03');
insert into mpp6379( a, b ) values( 2, '20090102' );
insert into mpp6379( a, b ) values( 2, '20090102' );
drop table mpp6379;
|
<filename>db/questionnaire_cloning_scripts/002_questionnaire_questions.sql<gh_stars>1-10
DROP FUNCTION IF EXISTS questionnaire_questions(
in_questionnaire_id INTEGER
);
CREATE OR REPLACE FUNCTION questionnaire_questions(
in_questionnaire_id INTEGER
) RETURNS SETOF questions
LANGUAGE sql AS $$
WITH question_parts AS (
SELECT * FROM questionnaire_parts_with_descendents(in_questionnaire_id)
WHERE part_type = 'Question'
)
SELECT questions.*
FROM question_parts
JOIN questions ON questions.id = part_id
$$;
|
<filename>src/test/regress/sql/hw_change_passwd.sql
--sysadmin change eachother passwd
create role ad1 with sysadmin password '<PASSWORD>';
create role ad2 with sysadmin password '<PASSWORD>';
set role ad1 password '<PASSWORD>';
alter role ad2 password '<PASSWORD>';
alter role ad2 identified by 'Ttest@1231' replace 'Ttest@123';
--sysadmin change his own passwd
alter role ad1 password '<PASSWORD>';
alter role ad1 identified by 'Ttest@1231' replace 'Ttest@123';
--ordinary user change his own passwd
create user hs password '<PASSWORD>';
set role hs password '<PASSWORD>';
alter role hs password '<PASSWORD>';
alter role hs identified by 'Ttest@1231' replace 'Ttest@123';
--sysadmin change ordinary user passwd
set role ad1 password '<PASSWORD>';
alter role hs password '<PASSWORD>';
--ordinary user change sysadmin passwd
set role hs password '<PASSWORD>';
alter role ad1 password '<PASSWORD>';
alter role ad1 identified by 'Ttest@1231111' replace 'Ttest@1231';
--initial account change sysadmin passwd
\c
alter role ad1 password '<PASSWORD>';
alter role ad1 identified by 'Ttest@123111111' replace 'Ttest@12311111';
create user DB_ACCOUNT_AUTH_OFF_user_041_01 with sysadmin password '<PASSWORD>';
create user DB_ACCOUNT_AUTH_OFF_user_041_02 password '<PASSWORD>';
set role DB_ACCOUNT_AUTH_OFF_user_041_01 password '<PASSWORD>';
alter role DB_ACCOUNT_AUTH_OFF_user_041_02 with sysadmin;
\c
drop user DB_ACCOUNT_AUTH_OFF_user_041_01;
drop user DB_ACCOUNT_AUTH_OFF_user_041_02;
create user DB_ACCOUNT_AUTH_user_047_01 with sysadmin password '<PASSWORD>';
create role DB_ACCOUNT_AUTH_user_047_07 with sysadmin password '<PASSWORD>';
set role DB_ACCOUNT_AUTH_user_047_01 password '<PASSWORD>';
alter role DB_ACCOUNT_AUTH_user_047_07 with nosysadmin;
\c
drop user DB_ACCOUNT_AUTH_user_047_01;
drop user DB_ACCOUNT_AUTH_user_047_07;
--1.system admin can not change each other's password.
--2.system admin can change normal user's password without offer old password.
--3.system admin can change his own password and need offer old password.
--4.inital account can change everyone's password without offer old password expect his own password.
create user tmpuser001 sysadmin password '<PASSWORD>';
create user tmpuser002 sysadmin password '<PASSWORD>';
set role tmpuser001 password '<PASSWORD>';
alter user tmpuser002 identified by 'test@1234' replace 'test@123';
alter user tmpuser002 with sysadmin identified by 'test@1234' replace 'test@123';
reset role;
drop user tmpuser001;
drop user tmpuser002;
|
-- creating tables:
CREATE TABLE REGIONS
(
REGION_ID INTEGER PRIMARY KEY NOT NULL
, REGION_NAME VARCHAR(25)
);
CREATE TABLE JOBS
(
JOB_ID VARCHAR(10) PRIMARY KEY NOT NULL
, JOB_TITLE VARCHAR(35) NOT NULL
, MIN_SALARY NUMERIC
, MAX_SALARY NUMERIC
);
CREATE TABLE COUNTRIES
(
COUNTRY_ID CHAR(2) PRIMARY KEY NOT NULL
, COUNTRY_NAME VARCHAR(40)
, REGION_ID INT
, FOREIGN KEY(REGION_ID) REFERENCES REGIONS(REGION_ID) ON DELETE CASCADE
);
CREATE TABLE LOCATIONS
(
LOCATION_ID INTEGER PRIMARY KEY NOT NULL
, STREET_ADDRESS VARCHAR(40)
, POSTAL_CODE VARCHAR(12)
, CITY VARCHAR(30) NOT NULL
, STATE_PROVINCE VARCHAR(25)
, COUNTRY_ID CHAR(2)
, FOREIGN KEY(COUNTRY_ID) REFERENCES COUNTRIES(COUNTRY_ID) ON DELETE CASCADE
);
CREATE TABLE DEPARTMENTS
(
DEPARTMENT_ID INTEGER PRIMARY KEY NOT NULL
, DEPARTMENT_NAME VARCHAR(30) NOT NULL
, MANAGER_ID INTEGER
, LOCATION_ID INTEGER
, FOREIGN KEY(MANAGER_ID) REFERENCES EMPLOYEES(EMPLOYEE_ID) ON DELETE SET NULL
, FOREIGN KEY(LOCATION_ID) REFERENCES LOCATIONS(LOCATION_ID) ON DELETE SET NULL
);
CREATE TABLE EMPLOYEES
(
EMPLOYEE_ID INTEGER PRIMARY KEY NOT NULL
, FIRST_NAME VARCHAR(20)
, LAST_NAME VARCHAR2(25) NOT NULL
, EMAIL VARCHAR(25) NOT NULL
, PHONE_NUMBER VARCHAR(20)
, HIRE_DATE TEXT NOT NULL
, JOB_ID VARCHAR(10) NOT NULL
, SALARY REAL
, COMMISSION_PCT REAL
, MANAGER_ID INTEGER
, DEPARTMENT_ID INTEGER
, FOREIGN KEY(MANAGER_ID) REFERENCES EMPLOYEES(EMPLOYEE_ID) ON DELETE CASCADE
, FOREIGN KEY(DEPARTMENT_ID) REFERENCES DEPARTMENTS(DEPARTMENT_ID) ON DELETE SET NULL
, FOREIGN KEY(JOB_ID) REFERENCES JOBS(JOB_ID) ON DELETE RESTRICT
);
CREATE TABLE JOB_HISTORY
(
EMPLOYEE_ID INTEGER NOT NULL
, START_DATE TEXT NOT NULL
, END_DATE TEXT NOT NULL
, JOB_ID VARCHAR(10) NOT NULL
, DEPARTMENT_ID INTEGER
, FOREIGN KEY(JOB_ID) REFERENCES JOBS(JOB_ID) ON DELETE CASCADE
, FOREIGN KEY(DEPARTMENT_ID) REFERENCES DEPARTMENTS(DEPARTMENT_ID) ON DELETE SET NULL
);
-- creating indexes:
CREATE UNIQUE INDEX EMP_EMP_ID_PK ON EMPLOYEES (EMPLOYEE_ID ASC);
CREATE INDEX EMP_MANAGER_IX ON EMPLOYEES (MANAGER_ID ASC);
CREATE INDEX EMP_DEPARTMENT_IX ON EMPLOYEES (DEPARTMENT_ID ASC);
CREATE INDEX EMP_JOB_IX ON EMPLOYEES (JOB_ID ASC);
CREATE INDEX EMP_NAME_IX ON EMPLOYEES (LAST_NAME ASC, FIRST_NAME ASC);
CREATE UNIQUE INDEX EMP_EMAIL_UK ON EMPLOYEES (EMAIL ASC);
CREATE UNIQUE INDEX DEPT_ID_PK ON DEPARTMENTS (DEPARTMENT_ID ASC);
CREATE INDEX DEPT_LOCATION_IX ON DEPARTMENTS (LOCATION_ID ASC);
CREATE INDEX LOC_CITY_IX ON LOCATIONS (CITY ASC);
CREATE INDEX LOC_COUNTRY_IX ON LOCATIONS (COUNTRY_ID ASC);
CREATE INDEX LOC_STATE_PROVINCE_IX ON LOCATIONS (STATE_PROVINCE ASC);
CREATE UNIQUE INDEX REG_ID_PK ON REGIONS (REGION_ID ASC);
CREATE UNIQUE INDEX JOB_ID_PK ON JOBS (JOB_ID ASC);
CREATE INDEX JHIST_EMPLOYEE_IX ON JOB_HISTORY (EMPLOYEE_ID ASC);
CREATE INDEX JHIST_DEPARTMENT_IX ON JOB_HISTORY (DEPARTMENT_ID ASC);
CREATE UNIQUE INDEX JHIST_EMP_ID_ST_DATE_PK ON JOB_HISTORY (EMPLOYEE_ID ASC, START_DATE ASC);
CREATE INDEX JHIST_JOB_IX ON JOB_HISTORY (JOB_ID ASC);
|
requirevars 'input_global_tbl';
var 'categorical' from select case when (select count(distinct val) from %{input_global_tbl})< 20 then "True" else "False" end;
var 'valIsText' from select case when (select typeof(val) from %{input_global_tbl} limit 1) ='text' then "True" else "False" end;
-----
drop table if exists results;
create table results as
select "SummaryStatistics" as type, colname as code, "NA" as categories, "count" as header, Ntotal as gval
from ( select colname, SUM(N) as Ntotal
from (select * from %{input_global_tbl} where val !='NA'));
insert into results
select "SummaryStatistics" as type, colname as code, "NA" as categories, "min" as header, case when '%{valIsText}'='False' then minval else "0" end as gval
from ( select colname, min(minval) as minval
from (select * from %{input_global_tbl} where minval !='NA' ));
insert into results
select "SummaryStatistics" as type, colname as code, "NA" as categories, "max" as header, case when '%{valIsText}'='False' then maxval else "0" end as gval
from ( select colname, max(maxval) as maxval
from (select * from %{input_global_tbl} where maxval != 'NA'));
insert into results
select "SummaryStatistics" as type, colname as code, "NA" as categories, "average" as header, case when '%{valIsText}'='False' then FARITH('/',S1A,counts) else "0" end as gval
from ( select colname, FSUM(S2) as S2A, FSUM(S1) as S1A, SUM(N) as counts
from (select * from %{input_global_tbl} where val !='NA'));
insert into results
select "SummaryStatistics" as type, colname as code, "NA" as categories, "std" as header,
case when '%{valIsText}'='False' then SQROOT( FARITH('/', '-', '*', counts, S2A, '*', S1A, S1A, '*', counts, '-', counts, 1)) else "0" end as gval
from ( select colname, FSUM(S2) as S2A, FSUM(S1) as S1A, SUM(N) as counts
from (select * from %{input_global_tbl} where val != 'NA'));
insert into results
select "DatasetStatistics1" as type, colname as code, "NA" as categories, val as header, Ntotal as gval
from ( select colname, val, SUM(N) as Ntotal
from (select * from %{input_global_tbl} where val !='NA' and '%{categorical}'='True' )
group by val);
insert into results
select "DatasetStatistics1" as type, colname as code, "NA" as categories, "NA" as header, Ntotal as gval
from ( select colname, val, SUM(N) as Ntotal
from (select * from %{input_global_tbl} where val =='NA' and '%{categorical}'='True' ) --NULL values
group by val);
insert into results
select "DatasetStatistics2" as type, colname as code, val as categories, __local_id as header, N as gval -- TODO: anti gia 0 na balw id nosokomeiou (nomizw pws auto thelei) -->des APOE
from (select * from %{input_global_tbl} where val !='NA' and '%{categorical}'='True' and '%{valIsText}'='False');
insert into results
select "DatasetStatistics2" as type, colname as code, "NA" as categories, __local_id as header, N as gval -- TODO: anti gia 0 na balw id nosokomeiou (nomizw pws auto thelei) -->des APOE
from (select * from %{input_global_tbl} where val =='NA' and '%{categorical}'='True' and '%{valIsText}'='False'); --NULL values
select jdict('statistics', stats) as result
from ( select jgroup(
cast(type as text),
cast(code as text),
cast(categories as text),
cast(header as text),
cast(gval as text)
) as stats
from results
);
|
<reponame>hubcivico/telegramImageBot
INSERT INTO label (id, label, name, createdAt, updatedAt)
VALUES
(1,'A','Cultura', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(2,'B','Economía', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(3,'C','Educación', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(4,'D','Medio Ambiente', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(5,'E','Medios de Comunicación', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(6,'F','Política', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(7,'G','Sanidad', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(8,'H','Otros temas', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); |
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: localhost Database: parquesnaturalesdb
-- ------------------------------------------------------
-- Server version 8.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `actividad_ecoturistica`
--
DROP TABLE IF EXISTS `actividad_ecoturistica`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `actividad_ecoturistica` (
`id_actividad_ecoturistica` int NOT NULL AUTO_INCREMENT,
`nombre_actividad_ecoturistica` varchar(45) NOT NULL,
`estado_actividad_ecoturistica` tinyint NOT NULL DEFAULT '1',
`descripcion_actividad_ecoturistica` varchar(256) DEFAULT NULL,
`PARQUE_NATURAL_id_parque` int NOT NULL,
PRIMARY KEY (`id_actividad_ecoturistica`),
KEY `fk_ACTIVIDAD_ECOTURISTICA_PARQUE_NATURAL1_idx` (`PARQUE_NATURAL_id_parque`),
CONSTRAINT `fk_ACTIVIDAD_ECOTURISTICA_PARQUE_NATURAL1` FOREIGN KEY (`PARQUE_NATURAL_id_parque`) REFERENCES `parque_natural` (`id_parque`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `actividad_ecoturistica`
--
LOCK TABLES `actividad_ecoturistica` WRITE;
/*!40000 ALTER TABLE `actividad_ecoturistica` DISABLE KEYS */;
/*!40000 ALTER TABLE `actividad_ecoturistica` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `actividad_ilicita`
--
DROP TABLE IF EXISTS `actividad_ilicita`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `actividad_ilicita` (
`id_actividad_ilicita` int NOT NULL AUTO_INCREMENT,
`asunto_actividad_ilicita` varchar(45) NOT NULL,
`descripcion_actividad_ilicita` varchar(45) DEFAULT NULL,
`fecha_actividad_ilicita` date NOT NULL,
`PARQUE_NATURAL_id_parque` int NOT NULL,
PRIMARY KEY (`id_actividad_ilicita`),
KEY `fk_ACTIVIDAD_ILICITA_PARQUE_NATURAL1_idx` (`PARQUE_NATURAL_id_parque`),
CONSTRAINT `fk_ACTIVIDAD_ILICITA_PARQUE_NATURAL1` FOREIGN KEY (`PARQUE_NATURAL_id_parque`) REFERENCES `parque_natural` (`id_parque`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `actividad_ilicita`
--
LOCK TABLES `actividad_ilicita` WRITE;
/*!40000 ALTER TABLE `actividad_ilicita` DISABLE KEYS */;
INSERT INTO `actividad_ilicita` VALUES (1,'prueba','prueba','2020-11-30',1);
/*!40000 ALTER TABLE `actividad_ilicita` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `car`
--
DROP TABLE IF EXISTS `car`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `car` (
`nit_CAR` bigint NOT NULL,
`nombre_CAR` varchar(45) NOT NULL,
`ubicacion_CAR` varchar(100) NOT NULL,
`estado_CAR` tinyint NOT NULL DEFAULT '1',
`DECRETO_num_decreto` int NOT NULL,
PRIMARY KEY (`nit_CAR`),
KEY `fk_CAR_DECRETO1_idx` (`DECRETO_num_decreto`),
CONSTRAINT `fk_CAR_DECRETO1` FOREIGN KEY (`DECRETO_num_decreto`) REFERENCES `decreto` (`num_decreto`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `car`
--
LOCK TABLES `car` WRITE;
/*!40000 ALTER TABLE `car` DISABLE KEYS */;
INSERT INTO `car` VALUES (145764852,'CAR Cundinamarca','Avenida Calle 24 (Esperanza) # 60 - 50, Centro Empresarial',1,1),(874574145,'CAR de Risaralda','Avenida de las Américas # 46-40, ip centrex Pereira, Risalda',1,2),(941573684,'<NAME>','a 60-53, Cra. 1 #60-1, Neiva, Huila',1,3);
/*!40000 ALTER TABLE `car` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `cargo`
--
DROP TABLE IF EXISTS `cargo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cargo` (
`id_cargo` int NOT NULL AUTO_INCREMENT,
`nombre_cargo` varchar(45) NOT NULL,
PRIMARY KEY (`id_cargo`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `cargo`
--
LOCK TABLES `cargo` WRITE;
/*!40000 ALTER TABLE `cargo` DISABLE KEYS */;
INSERT INTO `cargo` VALUES (1,'Auxiliar de Gestion'),(2,'Auxiliar de Reservas'),(3,'Auxiliar de vigilancia');
/*!40000 ALTER TABLE `cargo` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `categoria_servicio`
--
DROP TABLE IF EXISTS `categoria_servicio`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `categoria_servicio` (
`id_categoria` int NOT NULL AUTO_INCREMENT,
`nombre_categoria` varchar(60) NOT NULL,
`TIPO_SERVICIO_id_tipo_servicio` int NOT NULL,
PRIMARY KEY (`id_categoria`),
KEY `fk_CATEGORIA_SERVICIO_TIPO_SERVICIO1_idx` (`TIPO_SERVICIO_id_tipo_servicio`),
CONSTRAINT `fk_CATEGORIA_SERVICIO_TIPO_SERVICIO1` FOREIGN KEY (`TIPO_SERVICIO_id_tipo_servicio`) REFERENCES `tipo_servicio` (`id_tipo_servicio`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `categoria_servicio`
--
LOCK TABLES `categoria_servicio` WRITE;
/*!40000 ALTER TABLE `categoria_servicio` DISABLE KEYS */;
INSERT INTO `categoria_servicio` VALUES (1,'Hotel',1),(2,'Camping',2);
/*!40000 ALTER TABLE `categoria_servicio` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `decreto`
--
DROP TABLE IF EXISTS `decreto`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `decreto` (
`num_decreto` int NOT NULL,
`fecha_decreto` date NOT NULL,
PRIMARY KEY (`num_decreto`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `decreto`
--
LOCK TABLES `decreto` WRITE;
/*!40000 ALTER TABLE `decreto` DISABLE KEYS */;
INSERT INTO `decreto` VALUES (1,'2020-11-19'),(2,'2020-11-19'),(3,'2020-11-19'),(4,'2020-11-19'),(5,'2020-11-19'),(6,'2020-11-19'),(7,'2020-11-19'),(8,'2020-11-19'),(9,'2020-11-19');
/*!40000 ALTER TABLE `decreto` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `especies`
--
DROP TABLE IF EXISTS `especies`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `especies` (
`id_num_especies` int NOT NULL,
`num_especies_vegetales` int NOT NULL DEFAULT '0',
`num_especies_animales` int NOT NULL DEFAULT '0',
PRIMARY KEY (`id_num_especies`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `especies`
--
LOCK TABLES `especies` WRITE;
/*!40000 ALTER TABLE `especies` DISABLE KEYS */;
INSERT INTO `especies` VALUES (1,30,40),(2,40,30),(3,74,37),(4,20,19),(5,30,36),(6,14,10);
/*!40000 ALTER TABLE `especies` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `estado`
--
DROP TABLE IF EXISTS `estado`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `estado` (
`id_estado` int NOT NULL AUTO_INCREMENT,
`nombre_estado` varchar(45) NOT NULL,
PRIMARY KEY (`id_estado`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `estado`
--
LOCK TABLES `estado` WRITE;
/*!40000 ALTER TABLE `estado` DISABLE KEYS */;
INSERT INTO `estado` VALUES (1,'PENDIENTE DE AUTORIZACION'),(2,'PENDIENTE DE PAGO'),(3,'SOLICITUD CANCELADA'),(4,'RESERVA CANCELADA'),(5,'RESERVA CUMPLIDA');
/*!40000 ALTER TABLE `estado` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `failed_jobs`
--
DROP TABLE IF EXISTS `failed_jobs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `failed_jobs` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `failed_jobs`
--
LOCK TABLES `failed_jobs` WRITE;
/*!40000 ALTER TABLE `failed_jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `failed_jobs` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ingreso_visitantes`
--
DROP TABLE IF EXISTS `ingreso_visitantes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ingreso_visitantes` (
`PARQUE_NATURAL_id_parque` int NOT NULL,
`VISITANTE_id_visitante` int NOT NULL,
`fecha_ingreso` datetime NOT NULL,
PRIMARY KEY (`PARQUE_NATURAL_id_parque`,`VISITANTE_id_visitante`),
KEY `fk_PARQUE_NATURAL_has_VISITANTE_VISITANTE1_idx` (`VISITANTE_id_visitante`),
KEY `fk_PARQUE_NATURAL_has_VISITANTE_PARQUE_NATURAL1_idx` (`PARQUE_NATURAL_id_parque`),
CONSTRAINT `fk_PARQUE_NATURAL_has_VISITANTE_PARQUE_NATURAL1` FOREIGN KEY (`PARQUE_NATURAL_id_parque`) REFERENCES `parque_natural` (`id_parque`),
CONSTRAINT `fk_PARQUE_NATURAL_has_VISITANTE_VISITANTE1` FOREIGN KEY (`VISITANTE_id_visitante`) REFERENCES `visitante` (`id_visitante`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ingreso_visitantes`
--
LOCK TABLES `ingreso_visitantes` WRITE;
/*!40000 ALTER TABLE `ingreso_visitantes` DISABLE KEYS */;
/*!40000 ALTER TABLE `ingreso_visitantes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `migrations`
--
DROP TABLE IF EXISTS `migrations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `migrations` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `migrations`
--
LOCK TABLES `migrations` WRITE;
/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `model_has_permissions`
--
DROP TABLE IF EXISTS `model_has_permissions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `model_has_permissions` (
`permission_id` bigint unsigned NOT NULL,
`model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`model_id` bigint unsigned NOT NULL,
PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`),
CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `model_has_permissions`
--
LOCK TABLES `model_has_permissions` WRITE;
/*!40000 ALTER TABLE `model_has_permissions` DISABLE KEYS */;
/*!40000 ALTER TABLE `model_has_permissions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `model_has_roles`
--
DROP TABLE IF EXISTS `model_has_roles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `model_has_roles` (
`role_id` bigint unsigned NOT NULL,
`model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`model_id` bigint unsigned NOT NULL,
PRIMARY KEY (`role_id`,`model_id`,`model_type`),
KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`),
CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `model_has_roles`
--
LOCK TABLES `model_has_roles` WRITE;
/*!40000 ALTER TABLE `model_has_roles` DISABLE KEYS */;
INSERT INTO `model_has_roles` VALUES (1,'App\\User',1),(2,'App\\User',2),(2,'App\\User',3),(2,'App\\User',4),(4,'App\\User',5),(3,'App\\User',6),(4,'App\\User',7),(3,'App\\User',8),(3,'App\\User',9),(4,'App\\User',10),(3,'App\\User',11),(4,'App\\User',12),(3,'App\\User',13),(4,'App\\User',14),(3,'App\\User',15),(4,'App\\User',16),(5,'App\\User',17),(5,'App\\User',18),(5,'App\\User',19),(5,'App\\User',20),(5,'App\\User',21),(5,'App\\User',22);
/*!40000 ALTER TABLE `model_has_roles` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `parque_natural`
--
DROP TABLE IF EXISTS `parque_natural`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `parque_natural` (
`id_parque` int NOT NULL AUTO_INCREMENT,
`nombre_parque` varchar(100) NOT NULL,
`extension_parque` float DEFAULT NULL,
`altitud_parque` int DEFAULT NULL,
`temperatura_parque` float DEFAULT NULL,
`estado_parque` tinyint NOT NULL DEFAULT '1',
`comunidades_indigenas` tinyint DEFAULT NULL,
`ubicacion_parque` varchar(100) NOT NULL,
`abierto_publico` tinyint NOT NULL DEFAULT '1',
`servicio_auditorio` tinyint NOT NULL DEFAULT '0',
`CAR_id_CAR` bigint NOT NULL,
`ESPECIES_id_num_especies` int NOT NULL,
`DECRETO_num_decreto` int NOT NULL,
`VALOR_INGRESO_id_valor_ingreso` int NOT NULL,
PRIMARY KEY (`id_parque`),
KEY `fk_PARQUE_NATURAL_CAR1_idx` (`CAR_id_CAR`),
KEY `fk_PARQUE_NATURAL_ESPECIES1_idx` (`ESPECIES_id_num_especies`),
KEY `fk_PARQUE_NATURAL_DECRETO1_idx` (`DECRETO_num_decreto`),
KEY `fk_PARQUE_NATURAL_VALOR_INGRESO1_idx` (`VALOR_INGRESO_id_valor_ingreso`),
CONSTRAINT `fk_PARQUE_NATURAL_CAR1` FOREIGN KEY (`CAR_id_CAR`) REFERENCES `car` (`nit_CAR`),
CONSTRAINT `fk_PARQUE_NATURAL_DECRETO1` FOREIGN KEY (`DECRETO_num_decreto`) REFERENCES `decreto` (`num_decreto`),
CONSTRAINT `fk_PARQUE_NATURAL_ESPECIES1` FOREIGN KEY (`ESPECIES_id_num_especies`) REFERENCES `especies` (`id_num_especies`),
CONSTRAINT `fk_PARQUE_NATURAL_VALOR_INGRESO1` FOREIGN KEY (`VALOR_INGRESO_id_valor_ingreso`) REFERENCES `valor_ingreso` (`id_valor_ingreso`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `parque_natural`
--
LOCK TABLES `parque_natural` WRITE;
/*!40000 ALTER TABLE `parque_natural` DISABLE KEYS */;
INSERT INTO `parque_natural` VALUES (1,'Chicaque',300,2000,16,1,0,'La Mesa - Mosquera',1,1,145764852,1,4,1),(2,'Chingaza',400,1000,18,1,0,'Municipios de Cundinamarca',0,1,145764852,2,5,2),(3,'Tayrona',200,1500,19,1,1,'Santa Marta',1,1,874574145,3,6,3),(4,'Sierra Nevada',100,600,21,1,1,'Santa Marta',0,1,874574145,4,7,4),(5,'Tatama',500,1400,26,1,0,'<NAME>',1,1,941573684,5,8,5),(6,'Ucumari',450,3000,24,1,1,'<NAME>',0,1,941573684,6,9,6);
/*!40000 ALTER TABLE `parque_natural` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `password_resets`
--
DROP TABLE IF EXISTS `password_resets`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
KEY `password_resets_email_index` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `password_resets`
--
LOCK TABLES `password_resets` WRITE;
/*!40000 ALTER TABLE `password_resets` DISABLE KEYS */;
/*!40000 ALTER TABLE `password_resets` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `permissions`
--
DROP TABLE IF EXISTS `permissions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `permissions` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `permissions`
--
LOCK TABLES `permissions` WRITE;
/*!40000 ALTER TABLE `permissions` DISABLE KEYS */;
INSERT INTO `permissions` VALUES (1,'gestionar CARs','web','2020-11-20 06:23:24','2020-11-20 06:23:24'),(2,'gestionar Parques','web','2020-11-20 06:23:25','2020-11-20 06:23:25'),(3,'registrar visitantes','web','2020-11-20 06:23:25','2020-11-20 06:23:25'),(4,'autorizar reservas','web','2020-11-20 06:23:25','2020-11-20 06:23:25'),(5,'registrar actividad','web','2020-11-20 06:23:25','2020-11-20 06:23:25');
/*!40000 ALTER TABLE `permissions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `persona`
--
DROP TABLE IF EXISTS `persona`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `persona` (
`id_persona` bigint NOT NULL,
`nombre_persona` varchar(45) NOT NULL,
`email_persona` varchar(100) DEFAULT NULL,
`direccion_residencia` varchar(60) NOT NULL,
`telefono_fijo` int DEFAULT NULL,
`telefono_movil` int NOT NULL,
`id_usuario` bigint unsigned NOT NULL,
PRIMARY KEY (`id_persona`),
KEY `fk_PERSONA_USUARIO_idx` (`id_usuario`),
CONSTRAINT `fk_PERSONA_USUARIO` FOREIGN KEY (`id_usuario`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `persona`
--
LOCK TABLES `persona` WRITE;
/*!40000 ALTER TABLE `persona` DISABLE KEYS */;
INSERT INTO `persona` VALUES (12312,'<NAME>','<EMAIL>','NA',123234434,319000004,15),(23424,'<NAME>','<EMAIL>','NA',234234,319000004,14),(235345,'<NAME>','<EMAIL>','NA',64654,313000004,6),(546546,'<NAME>','<EMAIL>','NA',444434,319000004,13),(1024588,'<NAME>','<EMAIL>','NA',4564464,319004004,2),(2342342,'<NAME>','<EMAIL>','NA',456423464,319000004,12),(2354656,'<NAME>','<EMAIL>','NA',234234,319000004,8),(4567976,'<NAME>','<EMAIL>','NA',0,319000004,18),(6575767,'<NAME>','<EMAIL>','NA',0,319000004,17),(6775555,'<NAME>','<EMAIL>','NA',0,319000004,19),(23424234,'<NAME>','<EMAIL>','NA',456464,319000004,4),(34534546,'<NAME>','<EMAIL>','NA',456234464,319000004,10),(44567987,'<NAME>','<EMAIL>','NA',0,319000004,21),(45465465,'<NAME>','<EMAIL>','NA',4564564,319000004,5),(45667867,'<NAME>','<EMAIL>','NA',0,319000004,22),(55454345,'<NAME>','<EMAIL>','NA',45654,319000004,7),(56546346,'<NAME>','<EMAIL>','NA',3423,319000667,11),(98975656,'<NAME>','<EMAIL>','NA',0,319000004,20),(102458738,'<NAME>','<EMAIL>','NA',456464,319000000,3),(234234235,'<NAME>','<EMAIL>','NA',554645,319000005,9),(1024583278,'<NAME>','<EMAIL>','NA',456464,319000004,1),(14234234234,'<NAME>','<EMAIL>','NA',434,319000004,16);
/*!40000 ALTER TABLE `persona` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `personal_parque_natural`
--
DROP TABLE IF EXISTS `personal_parque_natural`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `personal_parque_natural` (
`PARQUE_NATURAL_id_parque` int NOT NULL,
`TIPO_PERSONAL_id_tipo_personal` int NOT NULL,
`sueldo` int NOT NULL,
`CARGO_id_cargo` int NOT NULL,
`PERSONA_id_persona` bigint NOT NULL,
PRIMARY KEY (`PARQUE_NATURAL_id_parque`,`PERSONA_id_persona`,`TIPO_PERSONAL_id_tipo_personal`,`CARGO_id_cargo`),
KEY `fk_PARQUE_NATURAL_has_PERSONA_PARQUE_NATURAL1_idx` (`PARQUE_NATURAL_id_parque`),
KEY `fk_PERSONAL_PARQUE_NATURAL_TIPO_PERSONAL1_idx` (`TIPO_PERSONAL_id_tipo_personal`),
KEY `fk_PERSONAL_PARQUE_NATURAL_CARGO1_idx` (`CARGO_id_cargo`),
KEY `fk_PERSONAL_PARQUE_NATURAL_PERSONA1_idx` (`PERSONA_id_persona`),
CONSTRAINT `fk_PARQUE_NATURAL_has_PERSONA_PARQUE_NATURAL1` FOREIGN KEY (`PARQUE_NATURAL_id_parque`) REFERENCES `parque_natural` (`id_parque`),
CONSTRAINT `fk_PERSONAL_PARQUE_NATURAL_CARGO1` FOREIGN KEY (`CARGO_id_cargo`) REFERENCES `cargo` (`id_cargo`),
CONSTRAINT `fk_PERSONAL_PARQUE_NATURAL_PERSONA1` FOREIGN KEY (`PERSONA_id_persona`) REFERENCES `persona` (`id_persona`),
CONSTRAINT `fk_PERSONAL_PARQUE_NATURAL_TIPO_PERSONAL1` FOREIGN KEY (`TIPO_PERSONAL_id_tipo_personal`) REFERENCES `tipo_personal` (`id_tipo_personal`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `personal_parque_natural`
--
LOCK TABLES `personal_parque_natural` WRITE;
/*!40000 ALTER TABLE `personal_parque_natural` DISABLE KEYS */;
INSERT INTO `personal_parque_natural` VALUES (1,1,900000,1,235345),(1,3,900000,3,6575767),(1,2,900000,2,45465465),(2,1,900000,1,2354656),(2,3,900000,3,4567976),(2,2,900000,2,55454345),(3,3,900000,3,6775555),(3,2,900000,2,34534546),(3,1,900000,1,234234235),(4,2,900000,2,2342342),(4,1,900000,1,56546346),(4,3,900000,3,98975656),(5,2,900000,2,23424),(5,1,900000,1,546546),(5,3,900000,3,44567987),(6,1,900000,1,12312),(6,3,900000,3,45667867),(6,2,900000,2,14234234234);
/*!40000 ALTER TABLE `personal_parque_natural` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `role_has_permissions`
--
DROP TABLE IF EXISTS `role_has_permissions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `role_has_permissions` (
`permission_id` bigint unsigned NOT NULL,
`role_id` bigint unsigned NOT NULL,
PRIMARY KEY (`permission_id`,`role_id`),
KEY `role_has_permissions_role_id_foreign` (`role_id`),
CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `role_has_permissions`
--
LOCK TABLES `role_has_permissions` WRITE;
/*!40000 ALTER TABLE `role_has_permissions` DISABLE KEYS */;
INSERT INTO `role_has_permissions` VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
/*!40000 ALTER TABLE `role_has_permissions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `roles`
--
DROP TABLE IF EXISTS `roles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `roles` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `roles`
--
LOCK TABLES `roles` WRITE;
/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
INSERT INTO `roles` VALUES (1,'ministerio','web','2020-11-20 06:23:24','2020-11-20 06:23:24'),(2,'CAR','web','2020-11-20 06:23:24','2020-11-20 06:23:24'),(3,'PersonalGestion','web','2020-11-20 06:23:25','2020-11-20 06:23:25'),(4,'PersonalReserva','web','2020-11-20 06:23:25','2020-11-20 06:23:25'),(5,'Vigilancia','web','2020-11-20 06:23:25','2020-11-20 06:23:25');
/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `servicio_hospedaje`
--
DROP TABLE IF EXISTS `servicio_hospedaje`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `servicio_hospedaje` (
`id_servicio` int NOT NULL AUTO_INCREMENT,
`nombre_servicio` varchar(45) NOT NULL,
`descripcion servicio` varchar(45) DEFAULT NULL,
`estado_servicio` tinyint NOT NULL DEFAULT '1',
`capacidad` int NOT NULL,
`valor_servicio` int NOT NULL,
`PARQUE_NATURAL_id_parque` int NOT NULL,
`CATEGORIA_SERVICIO_id_categoria` int NOT NULL,
PRIMARY KEY (`id_servicio`),
KEY `fk_SERVICIO_ALOJAMIENTO_PARQUE_NATURAL1_idx` (`PARQUE_NATURAL_id_parque`),
KEY `fk_SERVICIO_ALOJAMIENTO_CATEGORIA_SERVICIO1_idx` (`CATEGORIA_SERVICIO_id_categoria`),
CONSTRAINT `fk_SERVICIO_ALOJAMIENTO_CATEGORIA_SERVICIO1` FOREIGN KEY (`CATEGORIA_SERVICIO_id_categoria`) REFERENCES `categoria_servicio` (`id_categoria`),
CONSTRAINT `fk_SERVICIO_ALOJAMIENTO_PARQUE_NATURAL1` FOREIGN KEY (`PARQUE_NATURAL_id_parque`) REFERENCES `parque_natural` (`id_parque`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `servicio_hospedaje`
--
LOCK TABLES `servicio_hospedaje` WRITE;
/*!40000 ALTER TABLE `servicio_hospedaje` DISABLE KEYS */;
INSERT INTO `servicio_hospedaje` VALUES (1,'Hotel Resort','Servicio de hotel resort',1,30,80000,1,1),(2,'Hotel 5 Estrellas','Servicio de hotel 5 estrellas',1,50,100000,3,1),(3,'Hotel Ecológico','Servicio de hotel ecológico',1,40,70000,5,1),(4,'Camping Libre','Servicio de camping',1,30,20000,3,2),(5,'Camping','Servicio de camping',1,40,24000,3,2),(6,'Camping simple','Servicio de camping simple',1,10,10000,5,2);
/*!40000 ALTER TABLE `servicio_hospedaje` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `solicitante`
--
DROP TABLE IF EXISTS `solicitante`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `solicitante` (
`id_solicitante` bigint NOT NULL,
`nombre_solicitante` varchar(100) NOT NULL,
`email_solicitante` varchar(100) NOT NULL,
`fecha_nacimiento_solicitante` date NOT NULL,
`genero_solicitante` varchar(9) NOT NULL,
`telefono_solicitante` bigint NOT NULL,
PRIMARY KEY (`id_solicitante`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `solicitante`
--
LOCK TABLES `solicitante` WRITE;
/*!40000 ALTER TABLE `solicitante` DISABLE KEYS */;
INSERT INTO `solicitante` VALUES (1023934606,'<NAME>','<EMAIL>','1994-07-20','Masculino',3192522839);
/*!40000 ALTER TABLE `solicitante` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `solicitud_reserva`
--
DROP TABLE IF EXISTS `solicitud_reserva`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `solicitud_reserva` (
`id_solicitud` int NOT NULL AUTO_INCREMENT,
`SERVICIO_id_servicio` int NOT NULL,
`SOLICITANTE_id_solicitante` bigint NOT NULL,
`numero_acompañantes` int DEFAULT NULL,
`inicio_reserva` datetime NOT NULL,
`fin_reserva` datetime NOT NULL,
`adelanto_reserva` tinyint NOT NULL DEFAULT '0',
`ESTADO_id_estado` int NOT NULL,
PRIMARY KEY (`id_solicitud`),
KEY `fk_SOLICITUD_RESERVA_SERVICIO1_idx` (`SERVICIO_id_servicio`),
KEY `fk_SOLICITUD_RESERVA_SOLICITANTE1_idx` (`SOLICITANTE_id_solicitante`),
KEY `fk_SOLICITUD_RESERVA_ESTADO1_idx` (`ESTADO_id_estado`),
CONSTRAINT `fk_SOLICITUD_RESERVA_ESTADO1` FOREIGN KEY (`ESTADO_id_estado`) REFERENCES `estado` (`id_estado`),
CONSTRAINT `fk_SOLICITUD_RESERVA_SERVICIO1` FOREIGN KEY (`SERVICIO_id_servicio`) REFERENCES `servicio_hospedaje` (`id_servicio`),
CONSTRAINT `fk_SOLICITUD_RESERVA_SOLICITANTE1` FOREIGN KEY (`SOLICITANTE_id_solicitante`) REFERENCES `solicitante` (`id_solicitante`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `solicitud_reserva`
--
LOCK TABLES `solicitud_reserva` WRITE;
/*!40000 ALTER TABLE `solicitud_reserva` DISABLE KEYS */;
INSERT INTO `solicitud_reserva` VALUES (10,2,1023934606,4,'2020-11-19 22:12:00','2020-11-27 22:14:00',0,1);
/*!40000 ALTER TABLE `solicitud_reserva` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tipo_personal`
--
DROP TABLE IF EXISTS `tipo_personal`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tipo_personal` (
`id_tipo_personal` int NOT NULL AUTO_INCREMENT,
`tipo_personal` varchar(45) NOT NULL,
PRIMARY KEY (`id_tipo_personal`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tipo_personal`
--
LOCK TABLES `tipo_personal` WRITE;
/*!40000 ALTER TABLE `tipo_personal` DISABLE KEYS */;
INSERT INTO `tipo_personal` VALUES (1,'Gestión'),(2,'Reservas'),(3,'Vigilancia');
/*!40000 ALTER TABLE `tipo_personal` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tipo_servicio`
--
DROP TABLE IF EXISTS `tipo_servicio`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tipo_servicio` (
`id_tipo_servicio` int NOT NULL AUTO_INCREMENT,
`nombre_tipo_servicio` varchar(45) NOT NULL,
PRIMARY KEY (`id_tipo_servicio`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tipo_servicio`
--
LOCK TABLES `tipo_servicio` WRITE;
/*!40000 ALTER TABLE `tipo_servicio` DISABLE KEYS */;
INSERT INTO `tipo_servicio` VALUES (1,'Hotel - Habitaciones'),(2,'Camping - Aire Libre');
/*!40000 ALTER TABLE `tipo_servicio` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'Admin Ministerio Ambiente','<EMAIL>',NULL,'$2y$10$7J7uqzpxKelGrQmRA0p4AuHkU9S0jqewZmQEp6z696SW4Q/uJJYla',NULL,'2020-11-20 06:29:24','2020-11-20 06:29:24'),(2,'Admin CAR Cundinamarca','<EMAIL>',NULL,'$2y$10$4Z99mL12ztmlHdRLwRqspeLTEm.yAzXslhSTJSMn6Jysrqot8CXGu',NULL,'2020-11-20 06:31:58','2020-11-20 06:31:58'),(3,'Admin <NAME>','<EMAIL>',NULL,'$2y$10$xrc8E.w9.Mf/kDrxfjoMK.upttiE0pykdgLimxSiWE5ddHWh9XrL6',NULL,'2020-11-20 06:33:41','2020-11-20 06:33:41'),(4,'Admin <NAME>','<EMAIL>',NULL,'$2y$10$j2xoHJWMIhq.1sny08dAuuxHEPN65qxN4YOFVGna1ASZtggk0qCT.',NULL,'2020-11-20 06:35:05','2020-11-20 06:35:05'),(5,'Reservas Chicaque','<EMAIL>',NULL,'$2y$10$DMKVVMkn9zk1V59ousDDvuSKhydI0LbTYB.MGvkQajYB8Lqfhvyt2',NULL,'2020-11-20 06:38:15','2020-11-20 06:38:15'),(6,'Gestion Chicaque','<EMAIL>',NULL,'$2y$10$LlKn.D6OE5v18rwkcjruZeBdWejfOa5XBduzHXeRujw5PzopNL7yq',NULL,'2020-11-20 06:39:04','2020-11-20 06:39:04'),(7,'Reservas Chingaza','<EMAIL>',NULL,'$2y$10$MWsfvJa5sE17c/uFSv0zu.g9rzMA5hNGaqVrq594lzq2QkZQQFnya',NULL,'2020-11-20 06:40:14','2020-11-20 06:40:14'),(8,'Gestion Chingaza','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(9,'Gestion Tayrona','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(10,'<NAME>','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(11,'Gestion Si<NAME>','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(12,'Reservas <NAME>','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(13,'Gestion Tatama','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(14,'Reservas Tatama','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(15,'Gestion Ucumari','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(16,'Reservas Ucumari','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(17,'<NAME>','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(18,'<NAME>','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(19,'<NAME>','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(20,'<NAME>','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(21,'<NAME>','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59'),(22,'<NAME>','<EMAIL>',NULL,'$2y$10$8R4ZZvC95WhImmQVMxYuQuAaT6vp01If0y5TJXkwhIH6RaxdaaVEi',NULL,'2020-11-20 06:40:59','2020-11-20 06:40:59');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `usuarios_car`
--
DROP TABLE IF EXISTS `usuarios_car`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `usuarios_car` (
`id_usuario_car` int NOT NULL AUTO_INCREMENT,
`PERSONA_id_persona` bigint NOT NULL,
`CAR_nit_CAR` bigint NOT NULL,
PRIMARY KEY (`id_usuario_car`),
KEY `fk_USUARIOS_CAR_PERSONA1_idx` (`PERSONA_id_persona`),
KEY `fk_USUARIOS_CAR_CAR1_idx` (`CAR_nit_CAR`),
CONSTRAINT `fk_USUARIOS_CAR_CAR1` FOREIGN KEY (`CAR_nit_CAR`) REFERENCES `car` (`nit_CAR`),
CONSTRAINT `fk_USUARIOS_CAR_PERSONA1` FOREIGN KEY (`PERSONA_id_persona`) REFERENCES `persona` (`id_persona`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `usuarios_car`
--
LOCK TABLES `usuarios_car` WRITE;
/*!40000 ALTER TABLE `usuarios_car` DISABLE KEYS */;
INSERT INTO `usuarios_car` VALUES (1,1024588,145764852),(2,102458738,874574145),(3,23424234,941573684);
/*!40000 ALTER TABLE `usuarios_car` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `valor_ingreso`
--
DROP TABLE IF EXISTS `valor_ingreso`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `valor_ingreso` (
`id_valor_ingreso` int NOT NULL,
`valor_adultos` int NOT NULL,
`valor_niños` int NOT NULL,
PRIMARY KEY (`id_valor_ingreso`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `valor_ingreso`
--
LOCK TABLES `valor_ingreso` WRITE;
/*!40000 ALTER TABLE `valor_ingreso` DISABLE KEYS */;
INSERT INTO `valor_ingreso` VALUES (1,15000,10000),(2,20000,11000),(3,30000,5000),(4,30000,9000),(5,16000,14000),(6,18000,13000);
/*!40000 ALTER TABLE `valor_ingreso` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `visitante`
--
DROP TABLE IF EXISTS `visitante`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `visitante` (
`id_visitante` int NOT NULL AUTO_INCREMENT,
`fecha_nacimiento_visitante` date NOT NULL,
`genero_visitante` varchar(9) NOT NULL,
PRIMARY KEY (`id_visitante`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `visitante`
--
LOCK TABLES `visitante` WRITE;
/*!40000 ALTER TABLE `visitante` DISABLE KEYS */;
/*!40000 ALTER TABLE `visitante` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2020-11-30 16:13:09
|
CREATE TABLE IF NOT EXISTS lol_version
(
id INT UNSIGNED AUTO_INCREMENT
PRIMARY KEY,
version VARCHAR(30) NOT NULL,
updated_at TIMESTAMP NULL,
created_at TIMESTAMP NULL
)
ENGINE = InnoDB
COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS lol_champions
(
id INT UNSIGNED AUTO_INCREMENT
PRIMARY KEY,
championId INT UNSIGNED NOT NULL,
name VARCHAR(30) NOT NULL,
title VARCHAR(30) NOT NULL,
updated_at TIMESTAMP NULL,
created_at TIMESTAMP NULL
)
ENGINE = InnoDB
COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS lol_summoners
(
id INT UNSIGNED AUTO_INCREMENT
PRIMARY KEY,
accountId INT UNSIGNED NOT NULL,
summonerId INT UNSIGNED NOT NULL,
name VARCHAR(30) NOT NULL,
summonerLevel INT UNSIGNED NOT NULL,
updated_at TIMESTAMP NULL,
created_at TIMESTAMP NULL,
CONSTRAINT lol_summoners_accountId_unique
UNIQUE (accountId),
CONSTRAINT lol_summoners_summonerId_unique
UNIQUE (summonerId)
)
ENGINE = InnoDB
COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS lol_league
(
id INT UNSIGNED AUTO_INCREMENT
PRIMARY KEY,
summonerId INT UNSIGNED NOT NULL,
queueType VARCHAR(30) NOT NULL,
wins INT UNSIGNED NOT NULL,
losses INT UNSIGNED NOT NULL,
rank VARCHAR(30) NOT NULL,
tier VARCHAR(30) NOT NULL,
leaguePoints INT UNSIGNED NOT NULL,
updated_at TIMESTAMP NULL,
created_at TIMESTAMP NULL,
CONSTRAINT lol_league_summonerId_unique
UNIQUE (summonerId),
CONSTRAINT lol_league_summonerId_foreign
FOREIGN KEY (summonerId) REFERENCES lol_summoners (summonerId)
ON UPDATE CASCADE
ON DELETE CASCADE
)
ENGINE = InnoDB
COLLATE = utf8mb4_unicode_ci;
|
USE `ii`;
UPDATE `addresses`
SET
`country` = (CASE
WHEN `country` LIKE 'B%' THEN 'Blocked'
WHEN `country` LIKE 'T%' THEN 'Test'
WHEN `country` LIKE 'P%' THEN 'In Progress'
ELSE `country`
END); |
CREATE TABLE [dbo].[AppDependency] (
[AppDependencyGuid] UNIQUEIDENTIFIER NOT NULL,
[AppGuid] UNIQUEIDENTIFIER NOT NULL,
[DependsOnAppGuid] UNIQUEIDENTIFIER NOT NULL,
CONSTRAINT [PK_AppDependency] PRIMARY KEY CLUSTERED ([AppDependencyGuid] ASC),
CONSTRAINT [FK_AppDependency_App] FOREIGN KEY ([AppGuid]) REFERENCES [dbo].[App] ([AppGuid]),
CONSTRAINT [FK_AppDependency_App1] FOREIGN KEY ([DependsOnAppGuid]) REFERENCES [dbo].[App] ([AppGuid])
);
|
SELECT
`File`.*,
`Recents`.`Id` AS `Recents.Id`,
`Recents`.`Name` AS `Recents.Name`,
`Recents`.`UserId` AS `Recents.UserId`,
`Recents->RecentFiles`.`Id` AS `Recents.RecentFiles.Id`,
`Recents->RecentFiles`.`LastRead` AS `Recents.RecentFiles.LastRead`,
`Recents->RecentFiles`.`LastPos` AS `Recents.RecentFiles.LastPos`,
`Recents->RecentFiles`.`RecentId` AS `Recents.RecentFiles.RecentId`,
`Recents->RecentFiles`.`FileId` AS `Recents.RecentFiles.FileId`,
`Favorites`.`Id` AS `Favorites.Id`,
`Favorites`.`Name` AS `Favorites.Name`,
`Favorites`.`UserId` AS `Favorites.UserId`,
`Favorites->FavoriteFile`.`Id` AS `Favorites.FavoriteFile.Id`,
`Favorites->FavoriteFile`.`FavoriteId` AS `Favorites.FavoriteFile.FavoriteId`,
`Favorites->FavoriteFile`.`FileId` AS `Favorites.FavoriteFile.FileId`
FROM (
SELECT
`File`.`Id`,
`File`.`Name`,
`File`.`Duration`,
`File`.`FullPath`,
`File`.`Type`,
`File`.`Size`,
`File`.`CreatedAt`,
`File`.`DirectoryId`,
`File`.`FolderId`,
REPLACE(File.Name, '[', '0') AS `N`,
`Recents->RecentFiles`.`LastRead` AS `LastRead`,
`Recents->RecentFiles`.`LastPos` AS `CurrentPos`,
`Favorites`.`UserId` AS `isFav`
FROM `Files` AS `File`
WHERE
(`File`.`Name` LIKE '%%')
AND (
SELECT
`RecentFiles`.`Id`
FROM `RecentFiles` AS `RecentFiles`
INNER JOIN `Recents` AS `Recent` ON `RecentFiles`.`RecentId` = `Recent`.`Id`
AND `Recent`.`Id` = '7z4l9'
WHERE
(`File`.`Id` = `RecentFiles`.`FileId`)
LIMIT
1
) IS NOT NULL
ORDER BY
LastRead DESC
LIMIT
0, 500
) AS `File`
INNER JOIN `RecentFiles` AS `Recents->RecentFiles` ON `File`.`Id` = `Recents->RecentFiles`.`FileId`
INNER JOIN `Recents` AS `Recents` ON `Recents`.`Id` = `Recents->RecentFiles`.`RecentId`
AND `Recents`.`Id` = '7z4l9'
LEFT OUTER JOIN `FavoriteFiles` AS `Favorites->FavoriteFile` ON `File`.`Id` = `Favorites->FavoriteFile`.`FileId`
LEFT OUTER JOIN `Favorites` AS `Favorites` ON `Favorites`.`Id` = `Favorites->FavoriteFile`.`FavoriteId`; |
/*
Author: This code was generated by DALGen version 1.1.0.0 available at https://github.com/H0r53/DALGen
Date: 1/15/2018
Description: Creates the emailtype table and respective stored procedures
*/
USE applicationtemplate;
-- ------------------------------------------------------------
-- Drop existing objects
-- ------------------------------------------------------------
DROP TABLE IF EXISTS `applicationtemplate`.`emailtype`;
DROP PROCEDURE IF EXISTS `applicationtemplate`.`usp_emailtype_Load`;
DROP PROCEDURE IF EXISTS `applicationtemplate`.`usp_emailtype_LoadAll`;
DROP PROCEDURE IF EXISTS `applicationtemplate`.`usp_emailtype_Add`;
DROP PROCEDURE IF EXISTS `applicationtemplate`.`usp_emailtype_Update`;
DROP PROCEDURE IF EXISTS `applicationtemplate`.`usp_emailtype_Delete`;
DROP PROCEDURE IF EXISTS `applicationtemplate`.`usp_emailtype_Search`;
-- ------------------------------------------------------------
-- Create table
-- ------------------------------------------------------------
CREATE TABLE `applicationtemplate`.`emailtype` (
Id INT AUTO_INCREMENT,
Name VARCHAR(255),
Description VARCHAR(1025),
CONSTRAINT pk_emailtype_Id PRIMARY KEY (Id)
);
-- ------------------------------------------------------------
-- Create default SCRUD sprocs for this table
-- ------------------------------------------------------------
DELIMITER //
CREATE PROCEDURE `applicationtemplate`.`usp_emailtype_Load`
(
IN paramId INT
)
BEGIN
SELECT
`emailtype`.`Id` AS `Id`,
`emailtype`.`Name` AS `Name`,
`emailtype`.`Description` AS `Description`
FROM `emailtype`
WHERE `emailtype`.`Id` = paramId;
END //
DELIMITER ;
DELIMITER //
CREATE PROCEDURE `applicationtemplate`.`usp_emailtype_LoadAll`
()
BEGIN
SELECT
`emailtype`.`Id` AS `Id`,
`emailtype`.`Name` AS `Name`,
`emailtype`.`Description` AS `Description`
FROM `emailtype`;
END //
DELIMITER ;
DELIMITER //
CREATE PROCEDURE `applicationtemplate`.`usp_emailtype_Add`
(
IN paramName VARCHAR(255),
IN paramDescription VARCHAR(1025)
)
BEGIN
INSERT INTO `emailtype` (Name,Description)
VALUES (paramName, paramDescription);
-- Return last inserted ID as result
SELECT LAST_INSERT_ID() as id;
END //
DELIMITER ;
DELIMITER //
CREATE PROCEDURE `applicationtemplate`.`usp_emailtype_Update`
(
IN paramId INT,
IN paramName VARCHAR(255),
IN paramDescription VARCHAR(1025)
)
BEGIN
UPDATE `emailtype`
SET Name = paramName
,Description = paramDescription
WHERE `emailtype`.`Id` = paramId;
END //
DELIMITER ;
DELIMITER //
CREATE PROCEDURE `applicationtemplate`.`usp_emailtype_Delete`
(
IN paramId INT
)
BEGIN
DELETE FROM `emailtype`
WHERE `emailtype`.`Id` = paramId;
END //
DELIMITER ;
DELIMITER //
CREATE PROCEDURE `applicationtemplate`.`usp_emailtype_Search`
(
IN paramId INT,
IN paramName VARCHAR(255),
IN paramDescription VARCHAR(1025)
)
BEGIN
SELECT
`emailtype`.`Id` AS `Id`,
`emailtype`.`Name` AS `Name`,
`emailtype`.`Description` AS `Description`
FROM `emailtype`
WHERE
COALESCE(emailtype.`Id`,0) = COALESCE(paramId,emailtype.`Id`,0)
AND COALESCE(emailtype.`Name`,'') = COALESCE(paramName,emailtype.`Name`,'')
AND COALESCE(emailtype.`Description`,'') = COALESCE(paramDescription,emailtype.`Description`,'');
END //
DELIMITER ;
|
<filename>migrations/2020-02-02-191110_create_authors/up.sql
CREATE TABLE authors (
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR NOT NULL,
description TEXT,
born DATE,
image BLOB,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
creator INTEGER NOT NULL REFERENCES users (id),
updated TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
|
insert into datetime_at(id, created_at, updated_at)
value(UUID_TO_BIN('56d973b5-9e47-4b12-960d-b3a6b84f697c'), '2020-06-15 23:27:15', '2020-06-15 23:27:15');
|
<filename>src/meta/functions/create_unique_indices.sql
CREATE OR REPLACE FUNCTION meta.create_unique_indices() RETURNS VOID AS
$BODY$
BEGIN
PERFORM meta.execute_dynamic_sql(
CONCAT('CREATE UNIQUE INDEX ', E'\n', --table_name, '__', attribute_name, '_ux', E'\n',
E'\t', 'ON ', schema_name, '.', table_name, E'\n',
E'\t', 'USING btree (', column_name, ');')
)
FROM meta.column
WHERE is_logical_primary_key IS TRUE
AND is_db_primary_key IS FALSE;
END;
$BODY$ LANGUAGE PLPGSQL;
|
-- +goose Up
-- SQL in this section is executed when the migration is applied.
ALTER TABLE users ADD name varchar(191) NOT NULL DEFAULT "" AFTER email;
UPDATE users SET name = email;
-- +goose Down
-- SQL in this section is executed when the migration is rolled back.
|
-- ptrchng.test
--
-- execsql {
-- CREATE TABLE t1(x INTEGER PRIMARY KEY, y BLOB);
-- INSERT INTO t1 VALUES(1, 'abc');
-- INSERT INTO t1 VALUES(2,
-- 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234356789');
-- INSERT INTO t1 VALUES(3, x'626c6f62');
-- INSERT INTO t1 VALUES(4,
-- x'000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324'
-- );
-- SELECT count(*) FROM t1;
-- }
CREATE TABLE t1(x INTEGER PRIMARY KEY, y BLOB);
INSERT INTO t1 VALUES(1, 'abc');
INSERT INTO t1 VALUES(2,
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234356789');
INSERT INTO t1 VALUES(3, x'626c6f62');
INSERT INTO t1 VALUES(4,
x'000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324'
);
SELECT count(*) FROM t1; |
-- SETTINGS
SET @iCategId = (SELECT `id` FROM `sys_options_categories` WHERE `name`='bx_spaces' LIMIT 1);
DELETE FROM `sys_options` WHERE `name` IN ('bx_spaces_members_mode', 'bx_spaces_internal_notifications');
INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `extra`, `check`, `check_params`, `check_error`, `order`) VALUES
('bx_spaces_members_mode', '', @iCategId, '_bx_spaces_option_members_mode', 'select', 'a:2:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:24:"get_options_members_mode";}', '', '', '', 40),
('bx_spaces_internal_notifications', '', @iCategId, '_bx_spaces_option_internal_notifications', 'checkbox', '', '', '', '', 50);
-- MENUS
DELETE FROM `sys_menu_items` WHERE `set_name`='bx_spaces_view_actions_all' AND `name`='notes';
INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `markers`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `visibility_custom`, `active`, `copyable`, `order`) VALUES
('bx_spaces_view_actions_all', 'bx_spaces', 'notes', '_sys_menu_item_title_system_va_notes', '_sys_menu_item_title_va_notes', 'javascript:void(0)', 'javascript:bx_get_notes(this, ''{module_uri}'', {content_id});', '', 'exclamation-triangle', '', '', '', 0, 2147483647, '', 1, 0, 280);
UPDATE `sys_objects_menu` SET `template_id`='18' WHERE `object`='bx_spaces_view_submenu';
DELETE FROM `sys_menu_items` WHERE `set_name`='bx_spaces_menu_manage_tools' AND `name`='clear-reports';
INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `markers`, `submenu_object`, `visible_for_levels`, `visibility_custom`, `active`, `copyable`, `order`) VALUES
('bx_spaces_menu_manage_tools', 'bx_spaces', 'clear-reports', '_bx_spaces_menu_item_title_system_clear_reports', '_bx_spaces_menu_item_title_clear_reports', 'javascript:void(0)', 'javascript:{js_object}.onClickClearReports({content_id});', '_self', 'eraser', '', '', '', 2147483647, '', 1, 0, 3);
-- GRIDS
DELETE FROM `sys_grid_fields` WHERE `object`='bx_spaces_fans' AND `name`='role';
INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `order`) VALUES
('bx_spaces_fans', 'role', '_bx_spaces_txt_role', '10%', '', 15);
UPDATE `sys_grid_fields` SET `width`='40%' WHERE `object`='bx_spaces_fans' AND `name`='actions';
DELETE FROM `sys_grid_actions` WHERE `object`='bx_spaces_fans' AND `name` IN ('to_admins', 'from_admins', 'set_role', 'set_role_submit');
INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `confirm`, `order`) VALUES
('bx_spaces_fans', 'single', 'set_role', '_bx_spaces_txt_set_role', '', 0, 20),
('bx_spaces_fans', 'single', 'set_role_submit', '', '', 0, 21);
DELETE FROM `sys_grid_actions` WHERE `object`='bx_spaces_administration' AND `name`='clear_reports';
INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
('bx_spaces_administration', 'bulk', 'clear_reports', '_bx_spaces_grid_action_title_adm_clear_reports', '', 0, 1, 4);
-- EMAIL TEMPLATES
DELETE FROM `sys_email_templates` WHERE `Name`='bx_spaces_set_role';
INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `Body`) VALUES
('bx_spaces', '_bx_spaces_email_set_role', 'bx_spaces_set_role', '_bx_spaces_email_set_role_subject', '_bx_spaces_email_set_role_body');
|
<filename>backend/de.metas.fresh/de.metas.fresh.base/src/main/sql/postgresql/ddl/functions/fresh_PriceList_Details_Report_With_PP_PI.sql
DROP FUNCTION IF EXISTS report.fresh_PriceList_Details_Report_With_PP_PI(numeric, numeric, numeric, character varying, text)
;
CREATE OR REPLACE FUNCTION report.fresh_pricelist_details_report_With_PP_PI(IN p_c_bpartner_id numeric,
IN p_m_pricelist_version_id numeric,
IN p_alt_pricelist_version_id numeric,
IN p_ad_language character varying,
IN p_show_product_price_pi_flag text)
RETURNS TABLE
(
bp_value text,
bp_name text,
productcategory text,
m_product_id integer,
value text,
customerproductnumber text,
productname text,
isseasonfixedprice character,
itemproductname character varying,
qtycuspertu numeric,
packingmaterialname text,
pricestd numeric,
PricePattern1 text,
altpricestd numeric,
PricePattern2 text,
hasaltprice integer,
uomsymbol text,
uom_x12de355 text,
attributes text,
m_productprice_id integer,
m_attributesetinstance_id integer,
m_hu_pi_item_product_id integer,
currency character(3),
currency2 character(3),
show_product_price_pi_flag text
)
AS
$BODY$
--
SELECT --
bp.value AS BP_Value,
bp.name AS BP_Name,
plc.ProductCategory,
plc.M_Product_ID::integer,
plc.Value,
bpp.ProductNo AS CustomerProductNumber,
COALESCE(pt.name, plc.ProductName) AS ProductName,
plc.IsSeasonFixedPrice,
CASE WHEN plc.m_hu_pi_version_id = 101 THEN NULL ELSE plc.ItemProductName END AS ItemProductName,
plc.QtyCUsPerTU,
plc.PackingMaterialName,
plc.PriceStd,
PricePattern1,
plc.AltPriceStd,
PricePattern2,
plc.HasAltPrice,
plc.UOMSymbol,
plc.UOM_X12DE355::text,
CASE WHEN p_ad_language = 'fr_CH' THEN Replace(plc.Attributes, 'AdR', 'DLR') ELSE plc.Attributes END AS Attributes,
plc.M_ProductPrice_ID::integer,
plc.M_AttributeSetInstance_ID::integer,
plc.M_HU_PI_Item_Product_ID::integer,
plc.currency AS currency,
plc.currency2 AS currency2,
p_show_product_price_pi_flag as show_product_price_pi_flag
FROM RV_fresh_PriceList_Comparison_With_PP_PI plc
LEFT OUTER JOIN M_Product_Trl pt ON plc.M_Product_ID = pt.M_Product_ID AND AD_Language = p_ad_language AND pt.isActive = 'Y'
LEFT OUTER JOIN C_BPartner bp ON plc.C_BPartner_ID = bp.C_BPartner_ID AND bp.isActive = 'Y'
LEFT OUTER JOIN C_BPartner_Product bpp ON bp.C_BPartner_ID = bpp.C_BPartner_ID AND plc.M_Product_ID = bpp.M_Product_ID AND bpp.isActive = 'Y'
WHERE TRUE
AND plc.C_BPartner_ID = p_c_bpartner_id
AND plc.M_Pricelist_Version_ID = p_m_pricelist_version_id
AND plc.Alt_Pricelist_Version_ID = coalesce(p_alt_pricelist_version_id, plc.m_pricelist_version_id)
AND CASE
WHEN p_alt_pricelist_version_id IS NOT NULL
THEN PriceStd != 0
ELSE PriceStd != 0 OR AltPriceStd != 0
END
ORDER BY plc.ProductCategoryValue,
plc.ProductName,
plc.seqNo,
plc.attributes,
plc.ItemProductName;
--
$BODY$
LANGUAGE sql STABLE
COST 100
ROWS 1000
;
|
CREATE TABLE IACUC_PROTOCOL_ATTACH_PRSNNL (
PA_PERSONNEL_ID NUMBER(12,0) NOT NULL,
PROTOCOL_ID_FK NUMBER(12,0) NOT NULL,
PROTOCOL_NUMBER VARCHAR2(20) NOT NULL,
SEQUENCE_NUMBER NUMBER(4,0) DEFAULT 1 NOT NULL,
TYPE_CD VARCHAR2(3) NOT NULL,
DOCUMENT_ID NUMBER(4,0) NOT NULL,
FILE_ID NUMBER(22,0) NOT NULL,
DESCRIPTION VARCHAR2(200) NOT NULL,
PERSON_ID NUMBER(12,0) NOT NULL,
UPDATE_TIMESTAMP DATE NOT NULL,
UPDATE_USER VARCHAR2(60) NOT NULL,
VER_NBR NUMBER(8,0) DEFAULT 1 NOT NULL,
OBJ_ID VARCHAR2(36) NOT NULL
)
/
ALTER TABLE IACUC_PROTOCOL_ATTACH_PRSNNL
ADD CONSTRAINT PK_IACUC_PROTO_ATTACH_PRSNNL
PRIMARY KEY (PA_PERSONNEL_ID)
/
|
{
"Properties": [
{
"IoTStateObservation": [
{
"Value": "level-alert"
}
],
"About": "Name"
},
{
"IoTStateObservation": [
{
"Value": "select Tools.CreateIoTEntities(*, 'LevelAlert', true), true as SetEventPerEntity from topics{[almanac.observation.iotentity.hash](about = '_5fb87cdf_24d2_3f96_8620_f108de542c2f_fake' or about = '_239d094b_7d77_3f32_8f43_7079a5634af3_fake' or about = '_21cec1c6_3b8e_3d84_901e_3aaae1655c4b_fake' or about = '_2ee611f1_a0f5_3f59_8aa7_a7ccaf7409a4_fake' ).std:groupwin(properties[0].about).win:length(5).win:time_batch(1 sec)} where properties[0].about like '%fillLevel%' group by properties[0].abouthaving avg(cast(properties[0].ioTStateObservation[0].value,double)) >80.0"
}
],
"About": "Statement"
}
],
"About": "DataFusionManager"
} |
-- MySQL Script generated by MySQL Workbench
-- Sat Sep 3 17:26:36 2016
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema steal
-- -----------------------------------------------------
DROP SCHEMA IF EXISTS `steal` ;
-- -----------------------------------------------------
-- Schema steal
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `steal` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ;
SHOW WARNINGS;
USE `steal` ;
-- -----------------------------------------------------
-- Table `steal`.`user_stealer`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `steal`.`user_stealer` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL,
`bio` TEXT NULL,
`create_utc` BIGINT NOT NULL,
`update_utc` BIGINT NOT NULL,
`modify_ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE INDEX `UQ_STEALER_NAME` (`name` ASC))
ENGINE = InnoDB;
SHOW WARNINGS;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|
<reponame>aravi5/drill-test-framework<gh_stars>0
explain plan for select * from (
select x, y, z from ( select a1, b1, avg(a1) from t1_v t1 group by a1, b1 ) as sq(x, y, z) where x not in (1,2,3)) t limit 0;
|
CREATE FUNCTION getQtyOrders(customerID int) RETURNS int AS $$
DECLARE
qty int;
BEGIN
SELECT COUNT(*) INTO qty
FROM Orders
WHERE accnum = customerID;
RETURN qty;
END;
$$ LANGUAGE plpgsql;
CREATE FUNCTION one() RETURNS integer AS '
SELECT 1 AS result;
' LANGUAGE SQL;
CREATE FUNCTION emp_stamp() RETURNS trigger AS $emp_stamp$
BEGIN
-- Check that empname and salary are given
IF NEW.empname IS NULL THEN
RAISE EXCEPTION 'empname cannot be null';
END IF;
IF NEW.salary IS NULL THEN
RAISE EXCEPTION '% cannot have null salary', NEW.empname;
END IF;
-- Who works for us when she must pay for it?
IF NEW.salary < 0 THEN
RAISE EXCEPTION '% cannot have a negative salary', NEW.empname;
END IF;
-- Remember who changed the payroll when
NEW.last_date := current_timestamp;
NEW.last_user := current_user;
RETURN NEW;
END;
$emp_stamp$ LANGUAGE plpgsql;
SELECT one(); |
CREATE PROCEDURE dbo.ProcWithSingleVariableSetToInitialisedVariable @par int
AS
BEGIN
declare @VAR INT = 1;
declare @var2 INT ;
SET @var2 = @var
END
GO |
<reponame>benjaminleighton/datacube-ows
-- Creating Materialised View Index 4/4
CREATE unique INDEX space_time_view_idx
ON space_time_view
USING BTREE(id)
|
PROC $sc_$cpu_md_symtab
;*******************************************************************************
; Test Name: MD_SymTab
; Test Level: Build Verification
; Test Type: Functional
;
; Test Description
; The purpose of this test is to verify the Memory Dwell (MD) Symbol Table
; functionality of the Core Flight System (CFS). Symbol Table support is
; optional and thus provided in a separate test. If the mission provides
; Symbol Table support, this test can be used to verify its functionality.
;
;
; Requirements Tested
; MD1004 If MD accepts any command as valid, MD shall execute the
; command, increment the MD Valid Command Counter and issue an
; event message.
; MD1005 If MD rejects any command, MD shall abort the command execution,; increment the MD Command Rejected Counter and issue an event
; message.
; MD2000 Upon receipt of a Start Dwell command, MD shall identify the
; command-specified tables as ENABLED and start processing the
; command-specified memory dwell tables, starting with the first
; entry, until one of the following:
; a) an entry that has a zero value for the Number of
; Bytes field
; b) until it has processed the last entry in a Dwell
; Table
; MD3000 During each memory dwell cycle, MD shall collect data specified
; in each enabled memory dwell table which contains the
; following:
; a) Table ID
; b) <Optional> signature
; c) For each desired sample up to <PLATFORM_DEFINED>
; entries:
; 1) address
; 2) number of bytes
; 3) delay between samples
; MD3000.1 <OPTIONAL> Symbol Name and offset can be used in lieu of an
; absolute address.
; MD3001 When MD collects all of the data specified in a memory dwell
; table (as defined in MD3000.2), MD shall issue a memory dwell
; message containing the following:
; a) Table ID
; b) <OPTIONAL> Signature
; c) Number of bytes sampled
; d) Data
; MD3002 Upon receipt of a Table Load, MD shall verify the contents of
; the table and if the table is invalid, reject the table.
; MD3002.2 If any address fails validation, MD shall reject the table.
; Validation includes:
; a) If a symbolic address is specified, Symbol Table is
; present and symbolic address is contained in the
; Symbol Table.
; b) resolved address (numerical value of symbolic address; + offset address) is within valid range
; c) if resolved address is specified for a 2-byte dwell,
; address is an even value,
; d) if resolved address is specified for a 4-byte dwell,
; address is an integral multiple of 4
; MD3002.4 <OPTIONAL> Symbol Name and offset can be used in lieu of an
; absolute address.
; MD4000 Upon receipt of a Jam Dwell command, MD shall update the
; command-specified memory dwell table with the command-specified
; information:
; a) Dwell Table Index
; b) Address
; c) Number of bytes (0,1,2 or 4)
; d) Delay Between Samples
; MD4000.2 If the command-specified address fails validation, MD shall
; reject the command. Validation includes:
; a) If a symbolic address is specified, Symbol Table is
; present and symbolic address is contained in the
; Symbol Table,
; b) resolved address (numerical value of symbolic address; if present + offset address) is within valid range
; c) if resolved address is specified for a 2-byte dwell,
; address is an even value,
; d) if resolved address is specified for a 4-byte dwell,
; address is a multiple integral of 4
; MD4000.4 <OPTIONAL> Symbol Name and offset can be used in lieu of an
; absolute address.
; MD8000 MD shall generate a housekeeping message containing the
; following:
; a) Valid Command Counter
; b) Command Rejected Counter
; 1. Enable/Disable Status
; 2. Number of Dwell Addresses
; 3. Dwell Rate
; 4. Number of Bytes
; 5. Current Dwell Packet Index
; 6. Current Entry in the Dwell Table
; 7. Current Countdown counter
; MD9000 Upon any initialization of the MD Application (cFE Power On, cFE; Processor Reset or MD Application Reset), MD shall initialize
; the following data to Zero
; a) Valid Command Counter
; b) Command Rejected Counter
; MD9001 Upon cFE Power-on Reset, MD shall initialize each Memory Dwell
; table status to DISABLED.
; MD9002 Upon cFE Power-on Reset, MD shall initialize each Memory Dwell
; table to zero.
; MD9003 MD shall store the following information whenever it changes
; (in support of a cFE Processor Reset or Application Reset):
; a) Enable/Disable Status for each Dwell
; b) <OPTIONAL> signature for each dwell
; c) Contents of each Dwell Table
; MD9004 On a cFE Processor Reset or a MD Application Reset, MD shall
; restore the information specified in MD9003.
;
;
; Prerequisite Conditions
; The CFS is up and running and ready to accept commands. The MD
; commands and TLM items exist in the GSE database. The display page
; for the MD Housekeeping exists. An MD test application exists
; which contains known data to dwell on, loads the initial dwell
; tables and sends wakeup calls to support testing of
; supercommutation.
;
; Assumptions and Constraints
; None
;
; Change History
; Date Name Description
; 09/30/08 <NAME> Original Procedure
; 12/07/09 <NAME> Added requirements to this prolog and also
; turned logging off around code that did not
; provide any significant benefit of logging
; 01/23/12 <NAME> Added variable names for the app, table names
; and ram disk
; 06/13/17 <NAME> Updated to use CPU1 for commanding and added a
; hostCPU variable for the utility procs to
; connect to the proper host.
;
; Arguments
; None
;
; Procedures Called
; $sc_$cpu_md_deftables
;
; Required Post-Test Analysis
; None
;**********************************************************************
;; Turn off logging for the includes
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
#include "ut_statusdefs.h"
#include "ut_cfe_info.h"
#include "tst_md_events.h"
#include "cfe_evs_events.h"
#include "cfe_es_events.h"
#include "md_platform_cfg.h"
#include "md_events.h"
#include "cfe_tbl_events.h"
#include "cfe_platform_cfg.h"
%liv (log_procedure) = logging
#define MD_1004 0
#define MD_1005 1
#define MD_2000 2
#define MD_3000 3
#define MD_3000_1 4
#define MD_3001 5
#define MD_3002 6
#define MD_3002_2 7
#define MD_3002_4 8
#define MD_4000 9
#define MD_4000_2 10
#define MD_4000_4 11
#define MD_8000 12
#define MD_9000 13
#define MD_9001 14
#define MD_9002 15
#define MD_9003 16
#define MD_9004 17
;**********************************************************************
; Define variables
;**********************************************************************
; GLOBAL Variables
global ut_req_array_size = 17
global ut_requirement[0 .. ut_req_array_size]
FOR i = 0 to ut_req_array_size DO
ut_requirement[i] = "U"
ENDDO
; LOCAL Variables
local cfe_requirements[0 .. ut_req_array_size] = ["MD_1004", "MD_1005", "MD_2000", "MD_3000", "MD_3000_1", "MD_3001", "MD_3002", "MD_3002_2", "MD_3002_4", "MD_4000", "MD_4000_2", "MD_4000_4", "MD_8000", "MD_9000", "MD_9001", "MD_9002", "MD_9003", "MD_9004"]
local cmdcnt, errcnt
local rawcmd
local stream1, dwell1, dwell2, dwell3, dwell4
local passed
LOCAL dwell_tbl1_load_pkt, dwell_tbl2_load_pkt, dwell_tbl3_load_pkt, dwell_tbl4_load_pkt
LOCAL dwell_tbl1_load_appid, dwell_tbl2_load_appid, dwell_tbl3_load_appid, dwell_tbl4_load_appid
local dwl_tbl_1_index, dwl_tbl_2_index, dwl_tbl_3_index, dwl_tbl_4_index
local testdata_addr, addr, workaddress
local errcnt
local dwell_pkt1_appid, dwell_pkt2_appid, dwell_pkt3_appid, dwell_pkt4_appid
local oldval, nextval, passed
local cnt
local MDAppName = "MD"
local ramDir = "RAM:0"
local MDTblName1 = MDAppName & ".DWELL_TABLE1"
local MDTblName2 = MDAppName & ".DWELL_TABLE2"
local MDTblName3 = MDAppName & ".DWELL_TABLE3"
local MDTblName4 = MDAppName & ".DWELL_TABLE4"
local hostCPU = "$CPU"
;; CPU1 is the default
dwell_tbl1_load_pkt = "0FA8"
dwell_tbl2_load_pkt = "0FA9"
dwell_tbl3_load_pkt = "0FAA"
dwell_tbl4_load_pkt = "0FAB"
dwell_tbl1_load_appid = 4008
dwell_tbl2_load_appid = 4009
dwell_tbl3_load_appid = 4010
dwell_tbl4_load_appid = 4011
dwell_pkt1_appid = "091"
dwell_pkt2_appid = "092"
dwell_pkt3_appid = "093"
dwell_pkt4_appid = "094"
; Local dwell data storage holding 30 entries of up to 62 bytes each
local dwelldata[30,62]
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
clear the local dwell data array
for i = 1 to 30 do
for j = 1 to 62 do
dwelldata[i,j] = 0
enddo
enddo
%liv (log_procedure) = logging
write ";*********************************************************************"
write "; Step 1.0: Initialize the CPU for this test.. "
write ";*********************************************************************"
write "; Command a Power-On Reset on $CPU. "
write ";********************************************************************"
/$SC_$CPU_ES_POWERONRESET
wait 10
close_data_center
wait 60
cfe_startup {hostCPU}
wait 5
write ";*********************************************************************"
write "; Step 1.1: Start the Memory Dwell Test (TST_MD) Application and "
write "; add any required subscriptions. "
write ";********************************************************************"
ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1
ut_setupevents "$SC", "$CPU", "TST_MD", TST_MD_INIT_INF_EID, "INFO", 2
s load_start_app ("TST_MD",hostCPU,"TST_MD_AppMain")
; Wait for app startup events
ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1
IF (UT_TW_Status = UT_Success) THEN
if ($SC_$CPU_find_event[1].num_found_messages = 1) then
write "<*> Passed - TST_MD Application Started"
else
write "<!> Failed - CFE_ES start Event Message for MD not received."
endif
else
write "<!> Failed - TST_MD Application start Event Message not received."
endif
;;; Need to set the stream based upon the cpu being used
;; CPU1 is the default
stream1 = x'92D'
write "Sending command to add subscription for TST_MD HK packet."
/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
wait 2
write "Opening TST MD HK Page."
page $SC_$CPU_TST_MD_HK
wait 5
; get the address of the test data area
testdata_addr = $SC_$CPU_TST_MD_TSTDATAADR
write ";*********************************************************************"
write "; Step 1.2: Start the Memory Dwell (MD) Application and "
write "; add any required subscriptions. "
write ";********************************************************************"
ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1
ut_setupevents "$SC", "$CPU", {MDAppName}, MD_INIT_INF_EID, "INFO", 2
s load_start_app (MDAppName,hostCPU,"MD_AppMain")
; Wait for app startup events
ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1
IF (UT_TW_Status = UT_Success) THEN
if ($SC_$CPU_find_event[1].num_found_messages = 1) then
write "<*> Passed - MD Application Started"
else
write "<!> Failed - CFE_ES start Event Message for MD not received."
endif
else
write "<!> Failed - MD Application start Event Message not received."
endif
local hkPktId
;;; Need to set the stream based upon the cpu being used
;; CPU1 is the default
stream1 = x'890'
hkPktId = "p090"
dwell1 = x'891'
dwell2 = x'892'
dwell3 = x'893'
dwell4 = x'894'
write "Sending commands to add subscriptions for MD HK and dwell packets."
/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
/$SC_$CPU_TO_ADDPACKET Stream=dwell1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
/$SC_$CPU_TO_ADDPACKET Stream=dwell2 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
wait 5
/$SC_$CPU_TO_ADDPACKET Stream=dwell3 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
/$SC_$CPU_TO_ADDPACKET Stream=dwell4 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
wait 10
write "Opening MD HK Page."
page $SC_$CPU_MD_HK
;;;; Dump the Table Registry
s get_file_to_cvt (ramDir, "cfe_tbl_reg.log", "$sc_$cpu_tbl_reg.log", hostCPU)
wait 10
; Search the Table Registry for the locations of the dwell tables
for i = 1 to $SC_$CPU_TBL_NUMTABLES do
if ($SC_$CPU_RF[i].$SC_$CPU_TBL_NAME = MDTblName1) then
dwl_tbl_1_index = i
elseif ($SC_$CPU_RF[i].$SC_$CPU_TBL_NAME = MDTblName2) then
dwl_tbl_2_index = i
elseif ($SC_$CPU_RF[i].$SC_$CPU_TBL_NAME = MDTblName3) then
dwl_tbl_3_index = i
elseif ($SC_$CPU_RF[i].$SC_$CPU_TBL_NAME = MDTblName4) then
dwl_tbl_4_index = i
endif
write "Table #",i," Name = ", $SC_$CPU_RF[i].$SC_$CPU_TBL_NAME
enddo
write "Dwell Table #1 is at index #" & dwl_tbl_1_index
write "Dwell Table #2 is at index #" & dwl_tbl_2_index
write "Dwell Table #3 is at index #" & dwl_tbl_3_index
write "Dwell Table #4 is at index #" & dwl_tbl_4_index
write ";*********************************************************************"
write "; Step 1.3: Enable DEBUG Event Messages "
write ";*********************************************************************"
cmdcnt = $SC_$CPU_EVS_CMDPC + 2
;; Enable DEBUG events for the MD and CFE_TBL applications ONLY
/$SC_$CPU_EVS_EnaAppEVTType Application=MDAppName DEBUG
wait 2
/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_TBL" DEBUG
ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed - Enable Debug events command sent properly."
else
write "<!> Failed - Enable Debug events command."
endif
write ";*********************************************************************"
write "; Step 1.4: Verify that the MD Housekeeping packet is being generated"
write "; and the telemetry items are initialized to zero (0). "
write ";*********************************************************************"
;; Verify the HK Packet is getting generated by waiting for the
;; sequencecount to increment
local seqTlmItem = hkPktId & "scnt"
local currSCnt = {seqTlmItem}
local expectedSCnt = currScnt + 2
ut_tlmwait {seqTlmItem}, {expectedSCnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed (8000) - Housekeeping packet is being generated."
ut_setrequirements MD_8000, "P"
else
write "<!> Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved."
ut_setrequirements MD_8000, "F"
endif
;; Check the HK tlm items to see if they are 0 or NULL
if ($SC_$CPU_MD_CMDPC = 0) AND ($SC_$CPU_MD_CMDEC = 0) THEN
write "<*> Passed (9000) - Housekeeping telemetry initialized properly."
ut_setrequirements MD_9000, "P"
else
write "<!> Failed (9000) - Housekeeping telemetry NOT initialized at startup."
write " CMDPC = ",$SC_$CPU_MD_CMDPC
write " CMDEC = ",$SC_$CPU_MD_CMDEC
ut_setrequirements MD_9000, "F"
endif
write ";*********************************************************************"
write "; Step 1.5: Verify that each MD table is disabled. "
write ";*********************************************************************"
if ($SC_$CPU_MD_EnableMask = 0) THEN
write "<*> Passed (9001) - Enable Mask initialized properly."
ut_setrequirements MD_9001, "P"
else
write "<!> Failed (9001) - Enable Mask was NOT initialized at startup."
write " EnableMask = ",$SC_$CPU_MD_EnableMask
ut_setrequirements MD_9001, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 1.6: Verify that each MD table is initialized to 0. "
write ";*********************************************************************"
passed = 1
FOR i = 1 to MD_NUM_DWELL_TABLES DO
if ($SC_$CPU_MD_AddrCnt[i] != 0) THEN
passed = 0
write "$SC_$CPU_MD_AddrCnt[", i, "] = ", $SC_$CPU_MD_AddrCnt[i]
endif
if ($SC_$CPU_MD_Rate[i] != 0) THEN
passed = 0
write "$SC_$CPU_MD_Rate[", i, "] = ", $SC_$CPU_MD_Rate[i]
endif
if ($SC_$CPU_MD_DataSize[i] != 0) THEN
passed = 0
write "$SC_$CPU_MD_DataSize[", i, "] = ", $SC_$CPU_MD_DataSize[i]
endif
if ($SC_$CPU_MD_DwPktOffset[i] != 0) THEN
passed = 0
write "$SC_$CPU_MD_DwPktOffset[", i, "] = ", $SC_$CPU_MD_DwPktOffset[i]
endif
if ($SC_$CPU_MD_DwTblEntry[i] != 0) THEN
passed = 0
write "$SC_$CPU_MD_DwTblEntry[", i, "] = ", $SC_$CPU_MD_DwTblEntry[i]
endif
ENDDO
if (passed = 1) THEN
write "<*> Passed (9002) - Memory Dwell tables initialized properly."
ut_setrequirements MD_9002, "P"
else
write "<!> Failed (9002) - Memory Dwell tables NOT initialized at startup."
ut_setrequirements MD_9002, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 1.7: Setup initial dwell tables"
write ";*********************************************************************"
write "; Setup the initial dwell tables"
s $sc_$cpu_md_deftables
wait 5
write ";*********************************************************************"
write "; Step 2.0: Symbol Table Tests - Valid Cases"
write ";*********************************************************************"
write "; Step 2.1: Load Table With Valid Symbols & Offsets and Start It "
write ";********************************************************************"
write "; Step 2.1.1: Load a dwell table into FIRST slot, that contains"
write "; entries with valid symbols, some with offsets "
write ";********************************************************************"
; Set up the table data
; Table summary
; Entry# Length Delay Offset
; 1 4 0 TestData+0
; 2 2 0 TestData+4
; 3 2 0 TestData+6
; 4 2 0 TestData+8
; 5 2 0 TestData+10
; 6 4 0 TestData+12
; 7 2 0 TestData+16
; 8 2 0 TestData+18
; 9 2 0 TestData+20
; 10 2 0 TestData+22
; 11 4 0 TestData+24
; 12 2 4 TestData+28
; 13 0 0 0
;
; Entries = 12; Size = 30; Total Delay = 4
; Set up dwell load table 1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Enabled=0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Signature="Table with signature"
; Entry #1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Length = 4
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Offset = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_SymName = "TestData"
; Entry #2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Length = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Offset = 4
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_SymName = "TestData"
; Entry #3
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[3].MD_TLE_Length = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[3].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[3].MD_TLE_Offset = 6
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[3].MD_TLE_SymName = "TestData"
; Entry #4
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[4].MD_TLE_Length = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[4].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[4].MD_TLE_Offset = 8
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[4].MD_TLE_SymName = "TestData"
; Entry #5
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[5].MD_TLE_Length = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[5].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[5].MD_TLE_Offset = 10
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[5].MD_TLE_SymName = "TestData"
; Entry #6
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[6].MD_TLE_Length = 4
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[6].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[6].MD_TLE_Offset = 12
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[6].MD_TLE_SymName = "TestData"
; Entry #7
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[7].MD_TLE_Length = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[7].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[7].MD_TLE_Offset = 16
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[7].MD_TLE_SymName = "TestData"
; Entry #8
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[8].MD_TLE_Length = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[8].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[8].MD_TLE_Offset = 18
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[8].MD_TLE_SymName = "TestData"
; Entry #9
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[9].MD_TLE_Length = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[9].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[9].MD_TLE_Offset = 20
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[9].MD_TLE_SymName = "TestData"
; Entry #10
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[10].MD_TLE_Length = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[10].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[10].MD_TLE_Offset = 22
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[10].MD_TLE_SymName = "TestData"
; Entry #11
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[11].MD_TLE_Length = 4
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[11].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[11].MD_TLE_Offset = 24
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[11].MD_TLE_SymName = "TestData"
; Entry #12 - with a delay of 4
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[12].MD_TLE_Length = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[12].MD_TLE_Delay = 4
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[12].MD_TLE_Offset = 28
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[12].MD_TLE_SymName = "TestData"
; Terminator entry
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[13].MD_TLE_Length = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[13].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[13].MD_TLE_Offset = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[13].MD_TLE_SymName = "TestData"
; Create a load file for dwell table #1 with this data (including signature)
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_FILE_LOADED_INF_EID, INFO, 1
s create_tbl_file_from_cvt (hostCPU,dwell_tbl1_load_appid,"Dwell Table #1 Load", "md_dwl_ld_sg_tbl1",MDTblName1, "$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Enabled", "$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[13]")
cmdcnt = $SC_$CPU_TBL_CMDPC+1
start load_table ("md_dwl_ld_sg_tbl1", hostCPU)
ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed (1004) - Table load command sent."
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004) - Table load command failed."
ut_setrequirements MD_1004, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", CFE_TBL_FILE_LOADED_INF_EID, "."
ut_setrequirements MD_1004, "F"
endif
wait 5
write ";**********************************************************************"
write "; Validate the inactive buffer for Dwell Table #1."
write ";**********************************************************************"
ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_VAL_REQ_MADE_INF_EID, "DEBUG", 1
ut_sendcmd "$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=MDTblName1"
if (UT_SC_Status = UT_SC_Success) then
write "<*> Passed - Inactive Table #1 validate command sent."
if ($SC_$CPU_find_event[1].num_found_messages = 1) then
write "<*> Passed - Event Msg ",$SC_$CPU_find_event[1].eventid," Found!"
else
write "<!> Failed - Event Message not received for Table #1 Validate command."
endif
else
write "<!> Failed - InActive Table #1 validation failed."
endif
; Look for the Validation success event
if ($SC_$CPU_EVS_EVENTID <> CFE_TBL_VALIDATION_INF_EID) then
ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1
wait 5
if ($SC_$CPU_find_event[1].num_found_messages != 1) then
write "<!> Failed - Inactive Dwell Table #1 validation. Event Message not received."
else
write "<*> Passed - Inactive Dwell Table #1 validated. Event Msg ",$SC_$CPU_evs_eventid," Found!"
endif
else
write "<*> Passed - Inactive Dwell Table #1 validated. Event Msg ",$SC_$CPU_evs_eventid," Found!"
endif
wait 5
write ";**********************************************************************"
write "; Activate the load for Dwell Table #1. "
write ";**********************************************************************"
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_LOAD_PEND_REQ_INF_EID, DEBUG, 1
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_UPDATE_SUCCESS_INF_EID, INFO, 2
ut_sendcmd "$SC_$CPU_TBL_ACTIVATE ATableName=MDTblName1"
if (ut_sc_status = UT_SC_Success) then
write "<*> Passed (1004) - Activate command sent properly."
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004) - Activate command not sent properly (", UT_SC_Status, ")."
ut_setrequirements MD_1004, "F"
endif
; Look for the Activation success event
wait 5
if ($SC_$CPU_find_event[2].num_found_messages = 1) then
write "<*> Passed (3002;3002.4) - Dwell Table #1 Activated. Event Msg ",$SC_$CPU_find_event[2].eventid," Found!"
ut_setrequirements MD_3002, "P"
ut_setrequirements MD_3002_4, "P"
else
write "<!> Failed (3002;3002.4) - Dwell Table #1 activation. Event Message not received!"
ut_setrequirements MD_3002, "F"
ut_setrequirements MD_3002_4, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages != 1) then
write "<!> Failed - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",CFE_TBL_LOAD_PEND_REQ_INF_EID, "."
endif
wait 5
write ";********************************************************************"
write "; Step 2.1.2: Send Start Dwell command, enabling the dwell table"
write ";********************************************************************"
write "Opening Dwell Packet 1 Page"
page $sc_$cpu_md_dwell_pkt1
ut_setupevents "$SC", "$CPU", {MDAppName}, MD_START_DWELL_INF_EID, "INFO", 1
ut_sendcmd "$SC_$CPU_MD_StartDwell TableMask=b'0001'"
if (UT_SC_Status = UT_SC_Success) then
write "<*> Passed (1004;2000) - Start Dwell command sent properly."
ut_setrequirements MD_1004, "P"
ut_setrequirements MD_2000, "P"
else
write "<!> Failed (1004;2000) - Start Dwell command not sent properly (", UT_SC_Status, ")."
ut_setrequirements MD_1004, "F"
ut_setrequirements MD_2000, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", MD_START_DWELL_INF_EID, "."
ut_setrequirements MD_1004, "F"
endif
; Check MD_EnableMask
if ($SC_$CPU_MD_EnableMask = b'0001') then
write "<*> Passed (2000) - Second Dwell Table was started, First Dwell Table still running."
ut_setrequirements MD_2000, "P"
else
write "<!> Failed (2000) - MD_EnableMask is not the expected value!"
ut_setrequirements MD_2000, "F"
endif
; Start the test data incrementing
ut_setupevents "$SC", "$CPU", "TST_MD", TST_MD_STARTDATA_INF_EID, "INFO", 1
/$SC_$CPU_TST_MD_StartData
wait 5
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed - Event message ",$SC_$CPU_find_event[1].eventid, " received"
else
write "<!> Failed - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", TST_MD_STARTDATA_INF_EID, "."
endif
ut_tlmwait $SC_$CPU_TST_MD_DATASTATE, 1
IF (UT_TW_Status = UT_Success) THEN
write "<*> Passed - Test data started"
else
write "<!> Failed - Test data was not started!"
endif
write ";********************************************************************"
write "; Step 2.1.3: Verify that memory dwell messages are received at"
write "; the proper rate and contain the correct number of entries"
write ";********************************************************************"
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Wait up to about 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt1_appid & "scnt"}
while ({"p" & dwell_pkt1_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
%liv (log_procedure) = logging
; Verify table id of the packet
IF ($SC_$CPU_MD_DwlPkt1TableId = 1) THEN
write "<*> Passed (3001) - Dwell packet contains ID for table 1"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet not received or packet does not contain ID for table 1!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of addresses of the packet
IF ($SC_$CPU_MD_DwlPkt1NumAddresses = 12) THEN
write "<*> Passed (3001) - Dwell packet for table 1 has correct number of addresses"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 1 does NOT have correct number of addresses!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of bytes of data of the packet
IF ($sc_$cpu_MD_DwlPkt1PktDataSize = 30) THEN
write "<*> Passed (3001) - Dwell packet for table 1 has correct data size"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 1 does NOT have correct data size!"
ut_setrequirements MD_3001, "F"
endif
; Verify rate of the packet
IF ($sc_$cpu_MD_DwlPkt1Rate = 4) THEN
write "<*> Passed (3001) - Dwell packet for table 1 has correct data rate"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 1 does NOT have correct data rate!"
ut_setrequirements MD_3001, "F"
endif
ut_tlmwait $SC_$CPU_MD_DwlPkt1TableId, 1
; Verify table id of the packet
IF (UT_TW_Status = UT_Success) THEN
write "<*> Passed (3001) - Dwell packet contains ID for table 1"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet not received or packet does not contain ID for table 1!"
ut_setrequirements MD_3001, "F"
endif
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Clear the local data
for i = 1 to 15 do
for j = 1 to 34 do
dwelldata[i,j] = 0
enddo
enddo
; Collect data 15 times
for i = 1 to 15 do
; Wait up to 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt1_appid & "scnt"}
while ({"p" & dwell_pkt1_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
; Collect the data from the packet
for j = 1 to 34 do
dwelldata[i,j] = $SC_$CPU_MD_DwlPkt1DwellData[j]
enddo
enddo
%liv (log_procedure) = logging
for j = 1 to 34 do
write "Byte ", j, "; 1:", dwelldata[1,j], " 2:", dwelldata[2,j], " 3:", dwelldata[3,j], " 4:", dwelldata[4,j], " 5:", dwelldata[5,j], " 6:", dwelldata[6,j], " 7:", dwelldata[7,j], " 8:", dwelldata[8,j], " 9:", dwelldata[9,j], " 10:", dwelldata[10,j], " 11:", dwelldata[11,j], " 12:", dwelldata[12,j], " 13:", dwelldata[13,j], " 14:", dwelldata[14,j], " 15:", dwelldata[15,j]
enddo
; Check the data - since the delay for this dwell table is 4 and the values
; are incrementing once per second, each collected data point should be 4 more
; than the previous one. The data in bytes 31 through 34 should remain 0
; throughout.
passed = 1
if (dwelldata[1,31] <> 0) or (dwelldata[1,32] <> 0) or (dwelldata[1,33] <> 0) or (dwelldata[1,34] <> 0) then
write "<!> FAILED at start - end of data not 0!"
passed = 0
endif
for i = 2 to 15 do
for j = 1 to 30 do
if (dwelldata[i-1,j] >= 252) then
if (dwelldata[i,j] <> dwelldata[i-1,j] - 252) then
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] <> (dwelldata[i-1,j] + 4)) THEN
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
endif
enddo
if (dwelldata[i,31] <> 0) or (dwelldata[i,32] <> 0) or (dwelldata[i,33] <> 0) or (dwelldata[i,34] <> 0) then
write "<!> FAILED at entry #", i, " - end of data not 0!"
passed = 0
endif
enddo
if (passed = 1) then
write "<*> Passed (3000;3000.1;3001) - Data was as expected and received at the correct rate."
ut_setrequirements MD_3000, "P"
ut_setrequirements MD_3000_1, "P"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3000;3000.1;3001) - Data was NOT as expected and/or not received at the correct rate!"
ut_setrequirements MD_3000, "F"
ut_setrequirements MD_3000_1, "F"
ut_setrequirements MD_3001, "F"
endif
; Check the sequence of the data. In this case every entry should be in
; sequence.
passed = 1
for i = 1 to 15 do
for j = 2 to 30 do
if (dwelldata[i,j] = 0) then
if (dwelldata[i,j-1] <> 255) then
write "<!> FAILED at (", i, ",", j, "): it should have been in sequence!!"
write "Previous byte was: ", dwelldata[i,j-1]
write "This byte was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] - dwelldata[i,j-1] <> 1) THEN
write "<!> FAILED at (", i, ",", j, "): it should have been in sequence!!"
write "Previous byte was: ", dwelldata[i,j-1]
write "This byte was: ", dwelldata[i,j]
passed = 0
endif
endif
enddo
enddo
if (passed = 1) then
write "<*> Passed (3000;3000.1;3001) - Data was sequenced as expected."
ut_setrequirements MD_3000, "P"
ut_setrequirements MD_3000_1, "P"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3000;3000.1;3001) - Data was NOT sequenced as expected!"
ut_setrequirements MD_3000, "F"
ut_setrequirements MD_3000_1, "F"
ut_setrequirements MD_3001, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 2.2: Jam Dwell With Valid Symbol, 0 Offset, and Start"
write "; The Table "
write ";********************************************************************"
write "; Step 2.2.1: Send Jam Dwell command, modifying an entry in the"
write "; SECOND table using a valid symbol and a 0 offset"
write ";********************************************************************"
; Table summary (initial)
; Entry# Length Delay Offset
; 1 2 1 testdata_addr+2
; 2 2 0 testdata_addr+4
; 3 0 0 0
;
; Entries = 2; Size = 4; Total Delay = 1
; Table summary (after jam dwell)
; Entry# Length Delay Offset
; 1 4 4 TestData
; 2 2 0 testdata_addr+4
; 3 0 0 0
;
; Entries = 2; Size = 6; Total Delay = 4
ut_setupevents "$SC", "$CPU", {MDAppName}, MD_JAM_DWELL_INF_EID, "INFO", 1
workaddress = testdata_addr+104
ut_sendcmd "$SC_$CPU_MD_JAMDWELL TableId=2 EntryId=1 FieldLength=4 DwellDelay=4 Offset=0 SymName=""TestData"""
if (UT_SC_Status = UT_SC_Success) then
write "<*> Passed (1004,4000,4000.4) - Jam Dwell command sent properly."
ut_setrequirements MD_1004, "P"
ut_setrequirements MD_4000, "P"
ut_setrequirements MD_4000_4, "P"
else
write "<!> Failed (1004,4000,4000.4) - Jam Dwell command not sent properly (", UT_SC_Status, ")."
ut_setrequirements MD_1004, "F"
ut_setrequirements MD_4000, "F"
ut_setrequirements MD_4000_4, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", MD_JAM_DWELL_INF_EID, "."
ut_setrequirements MD_1004, "F"
endif
wait 5
write ";********************************************************************"
write "; Step 2.2.2: Dump the table to verify that the entry has been"
write "; updated"
write ";********************************************************************"
; Display the Dwell Table #2 page
page $SC_$CPU_MD_DWELL_LOAD_TBL2
; Dump the current active dwell load table 2
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_WRITE_DUMP_INF_EID, INFO, 1
cmdcnt = $SC_$CPU_TBL_CMDPC+1
s get_tbl_to_cvt (ramDir,MDTblName2,"A","$cpu_symdump222",hostCPU,dwell_tbl2_load_pkt)
ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdcnt}
if (UT_TW_Status <> UT_Success) then
write "<!> Failed: Dump command for Dwell Table 2."
endif
; Check for event message
if ($SC_$CPU_find_event[1].num_found_messages != 1) then
if ($SC_$CPU_evs_eventid <> CFE_TBL_OVERWRITE_DUMP_INF_EID) then
write "<!> Failed: Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",CFE_TBL_WRITE_DUMP_INF_EID, "."
endif
endif
;; Check the table entry to see if it corresponds to what was jammed
if ($SC_$CPU_MD_Dwell_Load_Tbl2.MD_DTL_Entry[1].MD_TLE_Length = 4) AND ;;
($SC_$CPU_MD_Dwell_Load_Tbl2.MD_DTL_Entry[1].MD_TLE_Delay = 4) AND ;;
($SC_$CPU_MD_Dwell_Load_Tbl2.MD_DTL_Entry[1].MD_TLE_Offset = 0) AND ;;
($SC_$CPU_MD_Dwell_Load_Tbl2.MD_DTL_Entry[1].MD_TLE_SymName = "TestData") then
write "<*> Passed (4000) - The jammed entry has been found in the table."
ut_setrequirements MD_4000, "P"
else
write "<!> Failed (4000) - The table did not contain the jammed entry."
write "- Expected Length of 4 - table = ",$SC_$CPU_MD_Dwell_Load_Tbl2.MD_DTL_Entry[1].MD_TLE_Length
write "- Expected Delay of 2 - table = ",$SC_$CPU_MD_Dwell_Load_Tbl2.MD_DTL_Entry[1].MD_TLE_Delay
write "- Expected Offset of 0 - table = ",$SC_$CPU_MD_Dwell_Load_Tbl2.MD_DTL_Entry[1].MD_TLE_Offset
write "- Expected SymName of 'TestData' - table = ",$SC_$CPU_MD_Dwell_Load_Tbl2.MD_DTL_Entry[1].MD_TLE_SymName
ut_setrequirements MD_4000, "F"
endif
wait 5
write ";********************************************************************"
write "; Step 2.2.3: Send Start Dwell command, enabling SECOND dwell table. "
write ";********************************************************************"
write "Opening Dwell Packet 2 Page"
page $sc_$cpu_md_dwell_pkt2
ut_setupevents "$SC", "$CPU", {MDAppName}, MD_START_DWELL_INF_EID, "INFO", 1
ut_sendcmd "$SC_$CPU_MD_StartDwell TableMask=b'0010'"
if (UT_SC_Status = UT_SC_Success) then
write "<*> Passed (1004;2000) - Start Dwell command sent properly."
ut_setrequirements MD_1004, "P"
ut_setrequirements MD_2000, "P"
else
write "<!> Failed (1004;2000) - Start Dwell command not sent properly (", UT_SC_Status, ")."
ut_setrequirements MD_1004, "F"
ut_setrequirements MD_2000, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", MD_START_DWELL_INF_EID, "."
ut_setrequirements MD_1004, "F"
endif
; Check MD_EnableMask
if ($SC_$CPU_MD_EnableMask = b'0011') then
write "<*> Passed (2000) - Second Dwell Table was started, First Dwell Table still running."
ut_setrequirements MD_2000, "P"
else
write "<!> Failed (2000) - MD_EnableMask is not the expected value!"
ut_setrequirements MD_2000, "F"
endif
write ";********************************************************************"
write "; Step 2.2.4: Verify that memory dwell messages are received at"
write "; the proper rate and contain only one entry each"
write ";********************************************************************"
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Wait up to about 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt2_appid & "scnt"}
while ({"p" & dwell_pkt2_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
%liv (log_procedure) = logging
; Verify table id of the packet
IF ($SC_$CPU_MD_DwlPkt2TableId = 2) THEN
write "<*> Passed (3001) - Dwell packet contains ID for table 2"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet not received or packet does not contain ID for table 2!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of addresses of the packet
IF ($SC_$CPU_MD_DwlPkt2NumAddresses = 2) THEN
write "<*> Passed (3001) - Dwell packet for table 2 has correct number of addresses"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 2 does NOT have correct number of addresses!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of bytes of data of the packet
IF ($sc_$cpu_MD_DwlPkt2PktDataSize = 6) THEN
write "<*> Passed (3001) - Dwell packet for table 2 has correct data size"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 2 does NOT have correct data size!"
ut_setrequirements MD_3001, "F"
endif
; Verify rate of the packet
IF ($sc_$cpu_MD_DwlPkt2Rate = 4) THEN
write "<*> Passed (3001) - Dwell packet for table 2 has correct data rate"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 2 does NOT have correct data rate!"
ut_setrequirements MD_3001, "F"
endif
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Verify that the data increments by 2
; Clear the local data
for i = 1 to 15 do
for j = 1 to 10 do
dwelldata[i,j] = 0
enddo
enddo
; Collect data 15 times
for i = 1 to 15 do
; Wait up to 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt2_appid & "scnt"}
while ({"p" & dwell_pkt2_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
; Collect the data from the packet
for j = 1 to 10 do
dwelldata[i,j] = $SC_$CPU_MD_DwlPkt2DwellData[j]
enddo
enddo
%liv (log_procedure) = logging
for j = 1 to 10 do
write "Byte ", j, "; 1:", dwelldata[1,j], " 2:", dwelldata[2,j], " 3:", dwelldata[3,j], " 4:", dwelldata[4,j], " 5:", dwelldata[5,j], " 6:", dwelldata[6,j], " 7:", dwelldata[7,j], " 8:", dwelldata[8,j], " 9:", dwelldata[9,j], " 10:", dwelldata[10,j], " 11:", dwelldata[11,j], " 12:", dwelldata[12,j], " 13:", dwelldata[13,j], " 14:", dwelldata[14,j], " 15:", dwelldata[15,j]
enddo
; Check the data - since the delay for this dwell table is 4 and the values
; are incrementing once per second, each collected data point should be 4 more
; than the previous one. The data in bytes 7 through 10 should remain 0
; throughout.
passed = 1
if (dwelldata[1,7] <> 0) or (dwelldata[1,8] <> 0) or (dwelldata[1,9] <> 0) or (dwelldata[1,10] <> 0) then
write "<!> FAILED at start - end of data not 0!"
passed = 0
endif
for i = 2 to 15 do
for j = 1 to 6 do
if (dwelldata[i-1,j] >= 252) then
if (dwelldata[i,j] <> dwelldata[i-1,j] - 252) then
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] <> (dwelldata[i-1,j] + 4)) THEN
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
endif
enddo
if (dwelldata[i,7] <> 0) or (dwelldata[i,8] <> 0) or (dwelldata[i,9] <> 0) or (dwelldata[i,10] <> 0) then
write "<!> FAILED at entry #", i, " - end of data not 0!"
passed = 0
endif
enddo
if (passed = 1) then
write "<*> Passed (3000;3000.2;3001) - Data was as expected and received at the correct rate."
ut_setrequirements MD_3000, "P"
ut_setrequirements MD_3000_2, "P"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3000;3000.2;3001) - Data was NOT as expected and/or not received at the correct rate!"
ut_setrequirements MD_3000, "F"
ut_setrequirements MD_3000_2, "F"
ut_setrequirements MD_3001, "F"
endif
; Check the sequence of the data. This is dependent on position and length of
; delays as well as changes in the address (offset) of the entries.
passed = 1
for i = 1 to 15 do
for j = 2 to 4 do
if (dwelldata[i,j] = 0) then
if (dwelldata[i,j-1] <> 255) then
write "<!> FAILED at (", i, ",", j, "): it should have been in sequence!!"
write "Previous byte was: ", dwelldata[i,j-1]
write "This byte was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] - dwelldata[i,j-1] <> 1) THEN
write "<!> FAILED at (", i, ",", j, "): it should have been in sequence!!"
write "Previous byte was: ", dwelldata[i,j-1]
write "This byte was: ", dwelldata[i,j]
passed = 0
endif
endif
if (dwelldata[i,5] <= 4) then
if (dwelldata[i,5] - dwelldata[i,4] <> -251) then
write "<!> FAILED at (", i, ",5): it should have been delayed 4 (5 more then previous byte)!!"
write "Previous byte was: ", dwelldata[i,4]
write "This byte was: ", dwelldata[i,5]
passed = 0
endif
else
if (dwelldata[i,5] - dwelldata[i,4] <> 5) THEN
write "<!> FAILED at (", i, ",5): it should have been delayed 4 (5 more then previous byte)!!"
write "Previous byte was: ", dwelldata[i,4]
write "This byte was: ", dwelldata[i,5]
passed = 0
endif
endif
for j = 6 to 6 do
if (dwelldata[i,j] = 0) then
if (dwelldata[i,j-1] <> 255) then
write "<!> FAILED at (", i, ",", j, "): it should have been in sequence!!"
write "Previous byte was: ", dwelldata[i,j-1]
write "This byte was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] - dwelldata[i,j-1] <> 1) THEN
write "<!> FAILED at (", i, ",", j, "): it should have been in sequence!!"
write "Previous byte was: ", dwelldata[i,j-1]
write "This byte was: ", dwelldata[i,j]
passed = 0
endif
endif
enddo
enddo
enddo
if (passed = 1) then
write "<*> Passed (3000;3000.2;3001) - Data was sequenced as expected."
ut_setrequirements MD_3000, "P"
ut_setrequirements MD_3000_2, "P"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3000;3000.2;3001) - Data was NOT sequenced as expected!"
ut_setrequirements MD_3000, "F"
ut_setrequirements MD_3000_2, "F"
ut_setrequirements MD_3001, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 2.3: Jam Dwell Enabled Table With Valid Symbol, Non-Zero"
write "; Offset"
write ";********************************************************************"
write "; Step 2.3.1: Send Start Dwell command, enabling THIRD dwell"
write "; table"
write ";********************************************************************"
write "Opening Dwell Packet 3 Page"
page $sc_$cpu_md_dwell_pkt3
ut_setupevents "$SC", "$CPU", {MDAppName}, MD_START_DWELL_INF_EID, "INFO", 1
ut_sendcmd "$SC_$CPU_MD_StartDwell TableMask=b'0100'"
if (UT_SC_Status = UT_SC_Success) then
write "<*> Passed (1004;2000) - Start Dwell command sent properly."
ut_setrequirements MD_1004, "P"
ut_setrequirements MD_2000, "P"
else
write "<!> Failed (1004;2000) - Start Dwell command not sent properly (", UT_SC_Status, ")."
ut_setrequirements MD_1004, "F"
ut_setrequirements MD_2000, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", MD_START_DWELL_INF_EID, "."
ut_setrequirements MD_1004, "F"
endif
; Check MD_EnableMask
if ($SC_$CPU_MD_EnableMask = b'0111') then
write "<*> Passed (2000) - Third Dwell Table was started, First & Second Dwell Tables still running."
ut_setrequirements MD_2000, "P"
else
write "<!> Failed (2000) - MD_EnableMask is not the expected value!"
ut_setrequirements MD_2000, "F"
endif
write ";********************************************************************"
write "; Step 2.3.2: Send Jam Dwell command, modifying an entry in the"
write "; THIRD table using a valid symbol and a non-zero offset"
write ";********************************************************************"
; Table summary (initial)
; Entry# Length Delay Offset
; 1 2 1 testdata_addr+6
; 2 4 0 testdata_addr+8
; 3 0 0 0
;
; Entries = 2; Size = 6; Total Delay = 1
; Table summary (after jam dwell)
; Entry# Length Delay Offset
; 1 2 1 testdata_addr+6
; 2 4 0 testdata_addr+8
; 3 2 1 TestData+12
; 4 0 0 0
;
; Entries = 3; Size = 8; Total Delay = 2
ut_setupevents "$SC", "$CPU", {MDAppName}, MD_JAM_DWELL_INF_EID, "INFO", 1
workaddress = testdata_addr+104
ut_sendcmd "$SC_$CPU_MD_JAMDWELL TableId=3 EntryId=3 FieldLength=2 DwellDelay=1 Offset=12 SymName=""TestData"""
if (UT_SC_Status = UT_SC_Success) then
write "<*> Passed (1004,4000,4000.4) - Jam Dwell command sent properly."
ut_setrequirements MD_1004, "P"
ut_setrequirements MD_4000, "P"
ut_setrequirements MD_4000_4, "P"
else
write "<!> Failed (1004,4000,4000.4) - Jam Dwell command not sent properly (", UT_SC_Status, ")."
ut_setrequirements MD_1004, "F"
ut_setrequirements MD_4000, "F"
ut_setrequirements MD_4000_4, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", MD_JAM_DWELL_INF_EID, "."
ut_setrequirements MD_1004, "F"
endif
wait 5
write ";********************************************************************"
write "; Step 2.3.3: Dump the table to verify that the entry has been"
write "; updated"
write ";********************************************************************"
; Display the Dwell Table #3 page
page $SC_$CPU_MD_DWELL_LOAD_TBL3
; Dump the current active dwell load table 1
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_WRITE_DUMP_INF_EID, INFO, 1
cmdcnt = $SC_$CPU_TBL_CMDPC+1
s get_tbl_to_cvt (ramDir,MDTblName3,"A","$cpu_symdump_233",hostCPU,dwell_tbl3_load_pkt)
ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdcnt}
if (UT_TW_Status <> UT_Success) then
write "<!> Failed: Dump command for Dwell Table 3."
endif
; Check for event message
if ($SC_$CPU_find_event[1].num_found_messages != 1) then
if ($SC_$CPU_evs_eventid <> CFE_TBL_OVERWRITE_DUMP_INF_EID) then
write "<!> Failed: Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",CFE_TBL_WRITE_DUMP_INF_EID, "."
endif
endif
;; Check the table entry to see if it corresponds to what was jammed
if ($SC_$CPU_MD_Dwell_Load_Tbl3.MD_DTL_Entry[3].MD_TLE_Length = 2) AND ;;
($SC_$CPU_MD_Dwell_Load_Tbl3.MD_DTL_Entry[3].MD_TLE_Delay = 1) AND ;;
($SC_$CPU_MD_Dwell_Load_Tbl3.MD_DTL_Entry[3].MD_TLE_Offset = 12) AND ;;
($SC_$CPU_MD_Dwell_Load_Tbl3.MD_DTL_Entry[3].MD_TLE_SymName = "TestData") then
write "<*> Passed (4000) - The jammed entry has been found in the table."
ut_setrequirements MD_4000, "P"
else
write "<!> Failed (4000) - The table did not contain the jammed entry."
write "- Expected Length of 2 - table = ",$SC_$CPU_MD_Dwell_Load_Tbl2.MD_DTL_Entry[1].MD_TLE_Length
write "- Expected Delay of 1 - table = ",$SC_$CPU_MD_Dwell_Load_Tbl2.MD_DTL_Entry[1].MD_TLE_Delay
write "- Expected Offset of 12 - table = ",$SC_$CPU_MD_Dwell_Load_Tbl2.MD_DTL_Entry[1].MD_TLE_Offset
write "- Expected SymName of 'TestData' - table = ",$SC_$CPU_MD_Dwell_Load_Tbl2.MD_DTL_Entry[1].MD_TLE_SymName
ut_setrequirements MD_4000, "F"
endif
wait 5
write ";********************************************************************"
write "; Step 2.3.4: Verify that memory dwell messages are received at"
write "; the proper rate and contain only one entry each"
write ";********************************************************************"
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Wait up to about 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt3_appid & "scnt"}
while ({"p" & dwell_pkt3_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
%liv (log_procedure) = logging
; Verify table id of the packet
IF ($SC_$CPU_MD_DwlPkt3TableId = 3) THEN
write "<*> Passed (3001) - Dwell packet contains ID for table 3"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet not received or packet does not contain ID for table 3!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of addresses of the packet
IF ($SC_$CPU_MD_DwlPkt3NumAddresses = 3) THEN
write "<*> Passed (3001) - Dwell packet for table 3 has correct number of addresses"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 3 does NOT have correct number of addresses!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of bytes of data of the packet
IF ($sc_$cpu_MD_DwlPkt3PktDataSize = 8) THEN
write "<*> Passed (3001) - Dwell packet for table 3 has correct data size"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 3 does NOT have correct data size!"
ut_setrequirements MD_3001, "F"
endif
; Verify rate of the packet
IF ($sc_$cpu_MD_DwlPkt3Rate = 2) THEN
write "<*> Passed (3001) - Dwell packet for table 3 has correct data rate"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 3 does NOT have correct data rate!"
ut_setrequirements MD_3001, "F"
endif
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Verify that the data increments by 2
; Clear the local data
for i = 1 to 15 do
for j = 1 to 12 do
dwelldata[i,j] = 0
enddo
enddo
; Collect data 15 times
for i = 1 to 15 do
; Wait up to 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt3_appid & "scnt"}
while ({"p" & dwell_pkt3_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
; Collect the data from the packet
for j = 1 to 12 do
dwelldata[i,j] = $SC_$CPU_MD_DwlPkt3DwellData[j]
enddo
enddo
%liv (log_procedure) = logging
for j = 1 to 12 do
write "Byte ", j, "; 1:", dwelldata[1,j], " 2:", dwelldata[2,j], " 3:", dwelldata[3,j], " 4:", dwelldata[4,j], " 5:", dwelldata[5,j], " 6:", dwelldata[6,j], " 7:", dwelldata[7,j], " 8:", dwelldata[8,j], " 9:", dwelldata[9,j], " 10:", dwelldata[10,j], " 11:", dwelldata[11,j], " 12:", dwelldata[12,j], " 13:", dwelldata[13,j], " 14:", dwelldata[14,j], " 15:", dwelldata[15,j]
enddo
; Check the data - since the delay for this dwell table is 2 and the values
; are incrementing once per second, each collected data point should be 2 more
; than the previous one. The data in bytes 9 through 12 should remain 0
; throughout.
passed = 1
if (dwelldata[1,9] <> 0) or (dwelldata[1,10] <> 0) or (dwelldata[1,11] <> 0) or (dwelldata[1,12] <> 0) then
write "<!> FAILED at start - end of data not 0!"
passed = 0
endif
for i = 2 to 15 do
for j = 1 to 6 do
if (dwelldata[i-1,j] >= 254) then
if (dwelldata[i,j] <> dwelldata[i-1,j] - 254) then
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] <> (dwelldata[i-1,j] + 2)) THEN
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
endif
enddo
if (dwelldata[i,9] <> 0) or (dwelldata[i,10] <> 0) or (dwelldata[i,11] <> 0) or (dwelldata[i,12] <> 0) then
write "<!> FAILED at entry #", i, " - end of data not 0!"
passed = 0
endif
enddo
if (passed = 1) then
write "<*> Passed (3000;3000.2;3001) - Data was as expected and received at the correct rate."
ut_setrequirements MD_3000, "P"
ut_setrequirements MD_3000_2, "P"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3000;3000.2;3001) - Data was NOT as expected and/or not received at the correct rate!"
ut_setrequirements MD_3000, "F"
ut_setrequirements MD_3000_2, "F"
ut_setrequirements MD_3001, "F"
endif
; Check the sequence of the data. This is dependent on position and length of
; delays as well as changes in the address (offset) of the entries.
passed = 1
for i = 1 to 15 do
for j = 2 to 2 do
if (dwelldata[i,j] = 0) then
if (dwelldata[i,j-1] <> 255) then
write "<!> FAILED at (", i, ",", j, "): it should have been in sequence!!"
write "Previous byte was: ", dwelldata[i,j-1]
write "This byte was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] - dwelldata[i,j-1] <> 1) THEN
write "<!> FAILED at (", i, ",", j, "): it should have been in sequence!!"
write "Previous byte was: ", dwelldata[i,j-1]
write "This byte was: ", dwelldata[i,j]
passed = 0
endif
endif
if (dwelldata[i,3] <= 1) then
if (dwelldata[i,3] - dwelldata[i,2] <> -254) then
write "<!> FAILED at (", i, ",3): it should have been delayed 1 (2 more then previous byte)!!"
write "Previous byte was: ", dwelldata[i,4]
write "This byte was: ", dwelldata[i,5]
passed = 0
endif
else
if (dwelldata[i,3] - dwelldata[i,2] <> 2) THEN
write "<!> FAILED at (", i, ",3): it should have been delayed 1 (2 more then previous byte)!!"
write "Previous byte was: ", dwelldata[i,4]
write "This byte was: ", dwelldata[i,5]
passed = 0
endif
endif
for j = 4 to 8 do
if (dwelldata[i,j] = 0) then
if (dwelldata[i,j-1] <> 255) then
write "<!> FAILED at (", i, ",", j, "): it should have been in sequence!!"
write "Previous byte was: ", dwelldata[i,j-1]
write "This byte was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] - dwelldata[i,j-1] <> 1) THEN
write "<!> FAILED at (", i, ",", j, "): it should have been in sequence!!"
write "Previous byte was: ", dwelldata[i,j-1]
write "This byte was: ", dwelldata[i,j]
passed = 0
endif
endif
enddo
enddo
enddo
if (passed = 1) then
write "<*> Passed (3000;3000.2;3001) - Data was sequenced as expected."
ut_setrequirements MD_3000, "P"
ut_setrequirements MD_3000_2, "P"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3000;3000.2;3001) - Data was NOT sequenced as expected!"
ut_setrequirements MD_3000, "F"
ut_setrequirements MD_3000_2, "F"
ut_setrequirements MD_3001, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 3.0: Symbol Table Tests - Invalid Cases"
write ";*********************************************************************"
write "; Step 3.1: Load Table With Invalid Symbol "
write ";********************************************************************"
write "; Step 3.1.1: Load a dwell table that contains an entry with an"
write "; invalid symbol"
write ";********************************************************************"
; Set up the table data
; Table summary
; Entry# Length Delay Offset Symbol
; 1 2 1 50 Invalid
; 2 0 0 0
;
; Size = 2; Total Delay = 1
;;; Set up dwell load table 1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Enabled=0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Signature="Table with signature"
; Entry #1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Length = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Delay = 1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Offset = 50
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_SymName = "MD Invalid Symbol"
; Terminator entry
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Length = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Offset = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_SymName = ""
; Create a load file for dwell table #1 with this data (including signature)
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_FILE_LOADED_INF_EID, INFO, 1
s create_tbl_file_from_cvt (hostCPU,dwell_tbl1_load_appid,"Dwell Table #1 Load", "md_dwl_ld_sg_tbl1",MDTblName1, "$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Enabled", "$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2]")
cmdcnt = $SC_$CPU_TBL_CMDPC+1
start load_table ("md_dwl_ld_sg_tbl1", hostCPU)
ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed (1004) - Table load command sent."
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004): Table load command failed."
ut_setrequirements MD_1004, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1004): Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004): Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", CFE_TBL_FILE_LOADED_INF_EID, "."
ut_setrequirements MD_1004, "F"
endif
wait 5
write ";**********************************************************************"
write "; Validate the inactive buffer for Dwell Table #1."
write ";**********************************************************************"
ut_setupevents "$SC","$CPU","CFE_TBL", CFE_TBL_VAL_REQ_MADE_INF_EID, "DEBUG", 1
ut_setupevents "$SC","$CPU","CFE_TBL", CFE_TBL_VALIDATION_ERR_EID, "ERROR", 2
ut_setupevents "$SC","$CPU",{MDAppName}, MD_RESOLVE_ERR_EID, "ERROR", 3
ut_sendcmd "$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=MDTblName1"
if (UT_SC_Status = UT_SC_Success) then
write "<*> Passed - Inactive Table #1 validate command sent."
if ($SC_$CPU_find_event[1].num_found_messages = 1) then
write "<*> Passed - Event Msg ",$SC_$CPU_find_event[1].eventid," Found!"
else
write "<!> Failed - Event Message not received for Table #1 Validate command."
endif
else
write "<!> Failed - InActive Table #1 validation failed."
endif
; Look for the Validation failed event
if ($SC_$CPU_find_event[2].num_found_messages = 1) then
write "<*> Passed (3002;3002.2) - Inactive Dwell Table 1 failed validation as expected. Event Msg ",$SC_$CPU_find_event[2].eventid," Found!"
ut_setrequirements MD_3002, "P"
ut_setrequirements MD_3002_2, "P"
else
write "<!> Failed (3002;3002.2) - Validation failure Event Message not received!"
ut_setrequirements MD_3002, "F"
ut_setrequirements MD_3002_2, "F"
endif
; Look for MD message indicating failure due to unresolved symbol
if ($SC_$CPU_find_event[3].num_found_messages = 1) then
write "<*> Passed (3002.2) - Validation failed due to unresolved symbol. Event Msg ",$SC_$CPU_find_event[3].eventid," Found!"
ut_setrequirements MD_3002_2, "P"
else
write "<!> Failed (3002;3002.2) - Did not receive unresolved symbol Event Message!"
ut_setrequirements MD_3002_2, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 3.2: Load Table With Valid Symbol, Invalid Offset "
write ";********************************************************************"
write "; Step 3.2.1: Load a dwell table that contains an entry with a"
write "; valid symbol, but an invalid offset"
write ";********************************************************************"
; Set up the table data
; Table summary
; Entry# Length Delay Offset Symbol
; 1 2 1 8000002 TestData
; 2 0 0 0
;
; Size = 2; Total Delay = 1
;;; Set up dwell load table 1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Enabled=0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Signature="Table with signature"
; Entry #1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Length = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Delay = 1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Offset = x'8000002'
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_SymName = "TestData"
; Terminator entry
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Length = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Offset = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_SymName = ""
; Create a load file for dwell table #1 with this data (including signature)
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_FILE_LOADED_INF_EID, INFO, 1
s create_tbl_file_from_cvt (hostCPU,dwell_tbl1_load_appid,"Dwell Table #1 Load", "md_dwl_ld_sg_tbl1",MDTblName1, "$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Enabled", "$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2]")
cmdcnt = $SC_$CPU_TBL_CMDPC+1
start load_table ("md_dwl_ld_sg_tbl1", hostCPU)
ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed (1004) - Table load command sent."
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004): Table load command failed."
ut_setrequirements MD_1004, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1004): Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004): Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", CFE_TBL_FILE_LOADED_INF_EID, "."
ut_setrequirements MD_1004, "F"
endif
wait 5
write ";**********************************************************************"
write "; Validate the inactive buffer for Dwell Table #1."
write ";**********************************************************************"
ut_setupevents "$SC","$CPU","CFE_TBL", CFE_TBL_VAL_REQ_MADE_INF_EID, "DEBUG", 1
ut_setupevents "$SC","$CPU","CFE_TBL", CFE_TBL_VALIDATION_ERR_EID, "ERROR", 2
ut_setupevents "$SC","$CPU",{MDAppName}, MD_RANGE_ERR_EID, "ERROR", 3
ut_sendcmd "$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=MDTblName1"
if (UT_SC_Status = UT_SC_Success) then
write "<*> Passed - Inactive Table #1 validate command sent."
if ($SC_$CPU_find_event[1].num_found_messages = 1) then
write "<*> Passed - Event Msg ",$SC_$CPU_find_event[1].eventid," Found!"
else
write "<!> Failed - Event Message not received for Table #1 Validate command."
endif
else
write "<!> Failed - InActive Table #1 validation failed."
endif
; Look for the Validation failed event
if ($SC_$CPU_find_event[2].num_found_messages = 1) then
write "<*> Passed (3002;3002.2) - Inactive Dwell Table 1 failed validation as expected. Event Msg ",$SC_$CPU_find_event[2].eventid," Found!"
ut_setrequirements MD_3002, "P"
ut_setrequirements MD_3002_2, "P"
else
write "<!> Failed (3002;3002.2) - Validation failure Event Message not received!"
ut_setrequirements MD_3002, "F"
ut_setrequirements MD_3002_2, "F"
endif
; Look for MD message indicating failure due to range error
if ($SC_$CPU_find_event[3].num_found_messages = 1) then
write "<*> Passed (3002.2) - Validation failed due to range error. Event Msg ",$SC_$CPU_find_event[3].eventid," Found!"
ut_setrequirements MD_3002_2, "P"
else
write "<!> Failed (3002;3002.2) - Did not receive range error Event Message!"
ut_setrequirements MD_3002_2, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 3.3: Load Table With Valid Symbol & Offset With Entry"
write "; Specifying 2 Bytes, But Not Word Aligned "
write ";********************************************************************"
write "; Step 3.3.1: Load a dwell table that contains an entry with a valid "
write "; symbol and offset, specifying 2 bytes, but not word aligned"
write ";********************************************************************"
; Set up the table data
; Table summary
; Entry# Length Delay Offset Symbol
; 1 2 1 1 TestData
; 2 0 0 0
;
; Size = 2; Total Delay = 1
;;; Set up dwell load table 1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Enabled=0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Signature="Table with signature"
; Entry #1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Length = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Delay = 1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Offset = 1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_SymName = "TestData"
; Terminator entry
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Length = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Offset = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_SymName = ""
; Create a load file for dwell table #1 with this data (including signature)
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_FILE_LOADED_INF_EID, INFO, 1
s create_tbl_file_from_cvt (hostCPU,dwell_tbl1_load_appid,"Dwell Table #1 Load", "md_dwl_ld_sg_tbl1",MDTblName1, "$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Enabled", "$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2]")
cmdcnt = $SC_$CPU_TBL_CMDPC+1
start load_table ("md_dwl_ld_sg_tbl1", hostCPU)
ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed (1004) - Table load command sent."
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004): Table load command failed."
ut_setrequirements MD_1004, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1004): Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004): Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", CFE_TBL_FILE_LOADED_INF_EID, "."
ut_setrequirements MD_1004, "F"
endif
wait 5
write ";**********************************************************************"
write "; Step 3.3.2: Validate the inactive buffer for Dwell Table #1. "
write ";**********************************************************************"
ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_VAL_REQ_MADE_INF_EID,"DEBUG", 1
ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_VALIDATION_ERR_EID, "ERROR", 2
ut_setupevents "$SC","$CPU",{MDAppName},MD_TBL_ALIGN_ERR_EID, "ERROR", 3
ut_sendcmd "$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=MDTblName1"
if (UT_SC_Status = UT_SC_Success) then
write "<*> Passed - Inactive Table #1 validate command sent."
if ($SC_$CPU_find_event[1].num_found_messages = 1) then
write "<*> Passed - Event Msg ",$SC_$CPU_find_event[1].eventid," Found!"
else
write "<!> Failed - Event Message not received for Table #1 Validate command."
endif
else
write "<!> Failed - InActive Table #1 validation failed."
goto step3_4
endif
;; Look for the Validation failed event
if ($SC_$CPU_find_event[2].num_found_messages = 1) then
write "<*> Passed (3002;3002.2) - Inactive Dwell Table 1 failed validation as expected. Event Msg ",$SC_$CPU_find_event[2].eventid," Found!"
ut_setrequirements MD_3002, "P"
ut_setrequirements MD_3002_2, "P"
else
write "<!> Failed (3002;3002.2) - Validation failure Event Message not received!"
ut_setrequirements MD_3002, "F"
ut_setrequirements MD_3002_2, "F"
endif
;; Look for MD message indicating failure due to alignment error
if ($SC_$CPU_find_event[3].num_found_messages = 1) then
write "<*> Passed (3002.2) - Validation failed due to alignment error. Event Msg ",$SC_$CPU_find_event[3].eventid," Found!"
ut_setrequirements MD_3002_2, "P"
else
write "<!> Failed (3002;3002.2) - Did not receive alignment error Event Message!"
ut_setrequirements MD_3002_2, "F"
endif
wait 5
step3_4:
write ";*********************************************************************"
write "; Step 3.4: Load Table With Valid Symbol & Offset With Entry"
write "; Specifying 4 Bytes, But Not Long-Word Aligned "
write ";********************************************************************"
write "; Step 3.4.1: Load a dwell table that contains an entry with a valid "
write "; symbol and offset, specifying 4 bytes, but not long-word aligned"
write ";********************************************************************"
; Set up the table data
; Table summary
; Entry# Length Delay Offset Symbol
; 1 4 1 2 TestData
; 2 0 0 0
;
; Size = 2; Total Delay = 1
;;; Set up dwell load table 1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Enabled=0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Signature="Table with signature"
; Entry #1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Length = 4
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Delay = 1
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_Offset = 2
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[1].MD_TLE_SymName = "TestData"
; Terminator entry
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Length = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Delay = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_Offset = 0
$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2].MD_TLE_SymName = ""
; Create a load file for dwell table #1 with this data (including signature)
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_FILE_LOADED_INF_EID, INFO, 1
s create_tbl_file_from_cvt (hostCPU,dwell_tbl1_load_appid,"Dwell Table #1 Load", "md_dwl_ld_sg_tbl1",MDTblName1, "$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Enabled", "$SC_$CPU_MD_Dwell_Load_Tbl1.MD_DTL_Entry[2]")
cmdcnt = $SC_$CPU_TBL_CMDPC+1
start load_table ("md_dwl_ld_sg_tbl1", hostCPU)
ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed (1004) - Table load command sent."
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004): Table load command failed."
ut_setrequirements MD_1004, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1004): Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1004, "P"
else
write "<!> Failed (1004): Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", CFE_TBL_FILE_LOADED_INF_EID, "."
ut_setrequirements MD_1004, "F"
endif
wait 5
write ";**********************************************************************"
write "; Step 3.4.2: Validate the inactive buffer for Dwell Table #1. "
write "; The result depends upon whether alignment is enforced or not."
write ";**********************************************************************"
ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_VAL_REQ_MADE_INF_EID, "DEBUG", 1
ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_VALIDATION_ERR_EID, "ERROR", 2
ut_setupevents "$SC","$CPU",{MDAppName},MD_TBL_ALIGN_ERR_EID, "ERROR", 3
ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_VALIDATION_INF_EID, "INFO", 4
ut_sendcmd "$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=MDTblName1"
if (UT_SC_Status = UT_SC_Success) then
write "<*> Passed - Inactive Table #1 validate command sent."
if ($SC_$CPU_find_event[1].num_found_messages = 1) then
write "<*> Passed - Event Msg ",$SC_$CPU_find_event[1].eventid," Found!"
else
write "<!> Failed - Event Message not received for Table #1 Validate command."
endif
else
write "<!> Failed - InActive Table #1 validation failed."
goto step3_5
endif
if (MD_ENFORCE_DWORD_ALIGN = 1) then
; Look for the Validation failed event
if ($SC_$CPU_find_event[2].num_found_messages = 1) then
write "<*> Passed (3002;3002.2) - Inactive Dwell Table 1 failed validation as expected. Event Msg ",$SC_$CPU_find_event[2].eventid," Found!"
ut_setrequirements MD_3002, "P"
ut_setrequirements MD_3002_2, "P"
else
write "<!> Failed (3002;3002.2) - Validation failure Event Message not received!"
ut_setrequirements MD_3002, "F"
ut_setrequirements MD_3002_2, "F"
endif
; Look for MD message indicating failure due to alignment error
if ($SC_$CPU_find_event[3].num_found_messages = 1) then
write "<*> Passed (3002.2) - Validation failed due to alignment error. Event Msg ",$SC_$CPU_find_event[3].eventid," Found!"
ut_setrequirements MD_3002_2, "P"
else
write "<!> Failed (3002;3002.2) - Did not receive alignment error Event Message!"
ut_setrequirements MD_3002_2, "F"
endif
else
; Look for the Validation success event
if ($SC_$CPU_find_event[4].num_found_messages = 1) then
write "<*> Passed (3002;3002.2) - Inactive Dwell Table 1 passed validation with an unaligned entry as expected. Event Msg ",$SC_$CPU_find_event[4].eventid," Found!"
ut_setrequirements MD_3002, "P"
ut_setrequirements MD_3002_2, "P"
else
write "<!> Failed (3002;3002.2) - Validation success Event Message not received as expected!"
ut_setrequirements MD_3002, "F"
ut_setrequirements MD_3002_2, "F"
endif
endif
wait 5
step3_5:
write ";*********************************************************************"
write "; Step 3.5: Jam Dwell with Invalid Symbol"
write ";********************************************************************"
write "; Step 3.5.1: Send Jam Dwell command for FIRST table, specifying"
write "; invalid symbol"
write ";********************************************************************"
ut_setupevents "$SC","$CPU",{MDAppName},MD_CANT_RESOLVE_JAM_ADDR_ERR_EID,"ERROR", 1
errcnt = $SC_$CPU_MD_CMDEC + 1
/$SC_$CPU_MD_JAMDWELL TableId=1 EntryId=2 FieldLength=2 DwellDelay=0 Offset=0 SymName="MD Invalid Symbol"
ut_tlmwait $SC_$CPU_MD_CMDEC, {errcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed (1005) - Command Rejected Counter incremented."
ut_setrequirements MD_1005, "P"
else
write "<!> Failed (1005) - Command Rejected Counter did not increment as expected."
ut_setrequirements MD_1005, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1005;4000.2) - Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1005, "P"
ut_setrequirements MD_4000_2, "P"
else
write "<!> Failed (1005;4000.2) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",MD_CANT_RESOLVE_JAM_ADDR_ERR_EID, "."
ut_setrequirements MD_1005, "F"
ut_setrequirements MD_4000_2, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 3.6: Jam Dwell with Valid Symbol, Invalid Offset"
write ";********************************************************************"
write "; Step 3.6.1: Send Jam Dwell command for SECOND table, specifying"
write "; valid symbol, but and invalid offset"
write ";********************************************************************"
ut_setupevents "$SC","$CPU",{MDAppName},MD_INVALID_JAM_ADDR_ERR_EID, "ERROR", 1
errcnt = $SC_$CPU_MD_CMDEC + 1
/$SC_$CPU_MD_JAMDWELL TableId=2 EntryId=1 FieldLength=2 DwellDelay=0 Offset=x'8000004' SymName="TestData"
ut_tlmwait $SC_$CPU_MD_CMDEC, {errcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed (1005) - Command Rejected Counter incremented."
ut_setrequirements MD_1005, "P"
else
write "<!> Failed (1005) - Command Rejected Counter did not increment as expected."
ut_setrequirements MD_1005, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1005;4000.2) - Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1005, "P"
ut_setrequirements MD_4000_2, "P"
else
write "<!> Failed (1005;4000.2) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",MD_INVALID_JAM_ADDR_ERR_EID, "."
ut_setrequirements MD_1005, "F"
ut_setrequirements MD_4000_2, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 3.7: Jam Dwell with Valid Symbol & Offset, Specifying 2"
write "; Bytes, but not Word Aligned"
write ";********************************************************************"
write "; Step 3.7.1: Send Jam Dwell command for THIRD table, specifying a"
write "; valid symbol & offset and 2 bytes, but not word aligned"
write ";********************************************************************"
ut_setupevents "$SC","$CPU",{MDAppName},MD_JAM_ADDR_NOT_16BIT_ERR_EID,"ERROR", 1
errcnt = $SC_$CPU_MD_CMDEC + 1
/$SC_$CPU_MD_JAMDWELL TableId=3 EntryId=3 FieldLength=2 DwellDelay=0 Offset=3 SymName="TestData"
ut_tlmwait $SC_$CPU_MD_CMDEC, {errcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed (1005) - Command Rejected Counter incremented."
ut_setrequirements MD_1005, "P"
else
write "<!> Failed (1005) - Command Rejected Counter did not increment as expected."
ut_setrequirements MD_1005, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1005;4000.2) - Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1005, "P"
ut_setrequirements MD_4000_2, "P"
else
write "<!> Failed (1005;4000.2) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",MD_JAM_ADDR_NOT_16BIT_ERR_EID, "."
ut_setrequirements MD_1005, "F"
ut_setrequirements MD_4000_2, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 3.8: Jam Dwell with Valid Symbol & Offset, Specifying 4"
write "; Bytes, but not Long-Word Aligned"
write ";********************************************************************"
write "; Step 3.8.1: Dump Load table 4 in order to restore the jammed value "
write "; if alignment is not bening enforced."
write ";********************************************************************"
; Dump the current active dwell load table 2
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_WRITE_DUMP_INF_EID, INFO, 1
cmdcnt = $SC_$CPU_TBL_CMDPC+1
s get_tbl_to_cvt (ramDir,MDTblName4,"A","$cpu_symdump381",hostCPU,dwell_tbl4_load_pkt)
ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdcnt}
if (UT_TW_Status <> UT_Success) then
write "<!> Failed: Dump command for Dwell Table 4."
endif
; Check for event message
if ($SC_$CPU_find_event[1].num_found_messages != 1) then
if ($SC_$CPU_evs_eventid <> CFE_TBL_OVERWRITE_DUMP_INF_EID) then
write "<!> Failed: Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",CFE_TBL_WRITE_DUMP_INF_EID, "."
endif
endif
;; Save table entry #1 values
local savedLength = $SC_$CPU_MD_Dwell_Load_Tbl4.MD_DTL_Entry[1].MD_TLE_Length
local savedDelay = $SC_$CPU_MD_Dwell_Load_Tbl4.MD_DTL_Entry[1].MD_TLE_Delay
local savedOffset = $SC_$CPU_MD_Dwell_Load_Tbl4.MD_DTL_Entry[1].MD_TLE_Offset
local savedSymName = $SC_$CPU_MD_Dwell_Load_Tbl4.MD_DTL_Entry[1].MD_TLE_SymName
write ";********************************************************************"
write "; Step 3.8.2: Send Jam Dwell command for LAST table, specifying a"
write "; valid symbol & offset and 4 bytes, but not long-word aligned"
write ";********************************************************************"
ut_setupevents "$SC","$CPU",{MDAppName},MD_JAM_ADDR_NOT_32BIT_ERR_EID,"ERROR", 1
ut_setupevents "$SC","$CPU",{MDAppName},MD_JAM_DWELL_INF_EID, "INFO", 2
cmdcnt = $SC_$CPU_MD_CMDPC + 1
errcnt = $SC_$CPU_MD_CMDEC + 1
/$SC_$CPU_MD_JAMDWELL TableId=4 EntryId=1 FieldLength=4 DwellDelay=0 Offset=6 SymName="TestData"
if (MD_ENFORCE_DWORD_ALIGN = 1) then
ut_tlmwait $SC_$CPU_MD_CMDEC, {errcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed (1005) - Command Rejected Counter incremented."
ut_setrequirements MD_1005, "P"
else
write "<!> Failed (1005) - Command Rejected Counter did not increment as expected."
ut_setrequirements MD_1005, "F"
endif
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed (1005;4000.2) - Event message ",$SC_$CPU_find_event[1].eventid, " received"
ut_setrequirements MD_1005, "P"
ut_setrequirements MD_4000_2, "P"
else
write "<!> Failed (1005;4000.2) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",MD_JAM_ADDR_NOT_32BIT_ERR_EID, "."
ut_setrequirements MD_1005, "F"
ut_setrequirements MD_4000_2, "F"
endif
else
ut_tlmwait $SC_$CPU_MD_CMDPC, {cmdcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed (1005) - Command Accepted Counter incremented."
ut_setrequirements MD_1005, "P"
else
write "<!> Failed (1005) - Command Accepted Counter did not increment as expected."
ut_setrequirements MD_1005, "F"
endif
if ($SC_$CPU_find_event[2].num_found_messages = 1) THEN
write "<*> Passed (1005;4000.2) - Event message ",$SC_$CPU_find_event[2].eventid, " received"
ut_setrequirements MD_1005, "P"
ut_setrequirements MD_4000_2, "P"
else
write "<!> Failed (1005;4000.2) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",MD_JAM_DWELL_INF_EID, "."
ut_setrequirements MD_1005, "F"
ut_setrequirements MD_4000_2, "F"
endif
endif
wait 5
;; Only execute the next step if Alignment is not being ENFORCED
if (MD_ENFORCE_DWORD_ALIGN = 0) then
write ";********************************************************************"
write "; Step 3.8.3: Send Jam Dwell command to restore the original entry"
write ";********************************************************************"
ut_setupevents "$SC","$CPU",{MDAppName},MD_JAM_DWELL_INF_EID, "INFO", 2
cmdcnt = $SC_$CPU_MD_CMDPC + 1
/$SC_$CPU_MD_JAMDWELL TableId=4 EntryId=1 FieldLength=savedLength DwellDelay=savedDelay Offset=savedOffset SymName=savedSymName
ut_tlmwait $SC_$CPU_MD_CMDPC, {cmdcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed (1005) - Command Accepted Counter incremented."
ut_setrequirements MD_1005, "P"
else
write "<!> Failed (1005) - Command Accepted Counter did not increment as expected."
ut_setrequirements MD_1005, "F"
endif
endif
write ";*********************************************************************"
write "; Step 4.0: Reset Tests"
write ";*********************************************************************"
write "; Step 4.1: cFE Processor Reset "
write ";********************************************************************"
write "; Step 4.1.1: Dump the Load Tables before performing a Processor Reset "
write "; in order to verify the tables were restored."
write ";********************************************************************"
local tableName,dumpFileName
local loadPktId
local tbl_enaFlag[MD_NUM_DWELL_TABLES]
local tbl_signature[MD_NUM_DWELL_TABLES]
local tbl_length[MD_DWELL_TABLE_SIZE,MD_DWELL_TABLE_SIZE]
local tbl_delay[MD_DWELL_TABLE_SIZE,MD_DWELL_TABLE_SIZE]
local tbl_offset[MD_NUM_DWELL_TABLES,MD_DWELL_TABLE_SIZE]
local tbl_symName[MD_NUM_DWELL_TABLES,MD_DWELL_TABLE_SIZE]
local dataName
;; Display the pages (2 & 3 should already be displayed)
page $SC_$CPU_MD_DWELL_LOAD_TBL1
page $SC_$CPU_MD_DWELL_LOAD_TBL4
;; Dump each Dwell Table
for i = 1 to MD_NUM_DWELL_TABLES do
; Dump the dwell table
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_WRITE_DUMP_INF_EID, INFO, 1
tableName = MDAppName & ".DWELL_TABLE" & i
dumpFileName = "$cpu_tbl" & i & "symdmp411"
if (i = 1) then
loadPktId = dwell_tbl1_load_pkt
elseif (i = 2) then
loadPktId = dwell_tbl2_load_pkt
elseif (i = 3) then
loadPktId = dwell_tbl3_load_pkt
else
loadPktId = dwell_tbl4_load_pkt
endif
cmdcnt = $SC_$CPU_TBL_CMDPC+1
s get_tbl_to_cvt (ramDir,tableName,"A",dumpFileName,hostCPU,loadPktId)
ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdcnt}
if (UT_TW_Status <> UT_Success) then
write "<!> Failed: Dump command for Dwell Table ",i,"."
endif
; Check for event message
if ($SC_$CPU_find_event[1].num_found_messages != 1) then
if ($SC_$CPU_evs_eventid <> CFE_TBL_OVERWRITE_DUMP_INF_EID) then
write "<!> Failed: Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",CFE_TBL_WRITE_DUMP_INF_EID, "."
endif
endif
;; Store the table data
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Enabled"
tbl_enaFlag[i] = {dataName}
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Signature"
tbl_signature[i] = {dataName}
;; loop for each table entry
for j = 1 to MD_DWELL_TABLE_SIZE do
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_Length"
tbl_length[i,j] = {dataName}
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_Delay"
tbl_delay[i,j] = {dataName}
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_Offset"
tbl_offset[i,j] = {dataName}
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_SymName"
tbl_symName[i,j] = {dataName}
enddo
enddo
write ";********************************************************************"
write "; Step 4.1.2: Send cFE Processor Reset command"
write ";********************************************************************"
/$SC_$CPU_ES_PROCESSORRESET
wait 10
close_data_center
wait 60
cfe_startup {hostCPU}
wait 5
write "; Start the Memory Dwell Test (TST_MD) Application and "
write "; add any required subscriptions. "
ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1
ut_setupevents "$SC", "$CPU", "TST_MD", TST_MD_INIT_INF_EID, "INFO", 2
s load_start_app ("TST_MD",hostCPU,"TST_MD_AppMain")
; Wait for app startup events
ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1
IF (UT_TW_Status = UT_Success) THEN
if ($SC_$CPU_find_event[1].num_found_messages = 1) then
write "<*> Passed - TST_MD Application Started"
else
write "<!> Failed - CFE_ES start Event Message for MD not received."
endif
else
write "<!> Failed - TST_MD Application start Event Message not received."
endif
;;; Need to set the stream based upon the cpu being used
;; CPU1 is the default
stream1 = x'92D'
write "Sending command to add subscription for TST_MD HK packet."
/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
wait 2
write "Opening TST MD HK Page."
page $SC_$CPU_TST_MD_HK
wait 5
write "; Start the Memory Dwell (MD) Application and "
write "; add any required subscriptions. "
ut_setupevents "$SC","$CPU","CFE_ES", CFE_ES_START_INF_EID, "INFO", 1
ut_setupevents "$SC","$CPU",{MDAppName},MD_RECOVERED_TBL_VALID_INF_EID,"INFO", 2
ut_setupevents "$SC","$CPU",{MDAppName},MD_INIT_INF_EID, "INFO", 3
s load_start_app (MDAppName,hostCPU,"MD_AppMain")
; Wait for table recovery events
ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 4
IF (UT_TW_Status = UT_Success) THEN
write "<*> Passed (9004) - All MD Dwell Table recovery messages were received"
ut_setrequirements MD_9004, "P"
else
write "<!> Failed (9004) - Not all of the MD Dwell Table recovery messages were received!"
ut_setrequirements MD_9004, "F"
endif
; Wait for app startup events
ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1
IF (UT_TW_Status = UT_Success) THEN
if ($SC_$CPU_find_event[1].num_found_messages = 1) then
write "<*> Passed - MD Application Started"
else
write "<!> Failed - CFE_ES start Event Message for MD not received."
endif
else
write "<!> Failed - MD Application start Event Message not received."
endif
;;; Need to set the stream based upon the cpu being used
;; CPU1 is the default
stream1 = x'890'
dwell1 = x'891'
dwell2 = x'892'
dwell3 = x'893'
dwell4 = x'894'
write "Sending commands to add subscriptions for MD HK and dwell packets."
/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
/$SC_$CPU_TO_ADDPACKET Stream=dwell1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
/$SC_$CPU_TO_ADDPACKET Stream=dwell2 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
wait 5
/$SC_$CPU_TO_ADDPACKET Stream=dwell3 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
/$SC_$CPU_TO_ADDPACKET Stream=dwell4 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
wait 10
write "Opening MD HK Page."
page $SC_$CPU_MD_HK
write "; Enable DEBUG Event Messages "
cmdcnt = $SC_$CPU_EVS_CMDPC + 2
;; Enable DEBUG events for the MD and CFE_TBL applications ONLY
/$SC_$CPU_EVS_EnaAppEVTType Application=MDAppName DEBUG
wait 2
/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_TBL" DEBUG
ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed - Enable Debug events command sent properly."
else
write "<!> Failed - Enable Debug events command."
endif
write "; Verify that the MD Housekeeping telemetry items are "
write "; initialized to zero (0). "
;; Check the MD tlm items to see if they are 0 or NULL
if ($SC_$CPU_MD_CMDPC = 0) AND ($SC_$CPU_MD_CMDEC = 0) THEN
write "<*> Passed (9000) - Housekeeping telemetry initialized properly."
ut_setrequirements MD_9000, "P"
else
write "<!> Failed (9000) - Housekeeping telemetry NOT initialized at startup."
write " CMDPC = ",$SC_$CPU_MD_CMDPC
write " CMDEC = ",$SC_$CPU_MD_CMDEC
ut_setrequirements MD_9000, "F"
endif
wait 5
; get the address of the test data area
testdata_addr = $SC_$CPU_TST_MD_TSTDATAADR
; Start the test data incrementing
ut_setupevents "$SC", "$CPU", "TST_MD", TST_MD_STARTDATA_INF_EID, "INFO", 1
/$SC_$CPU_TST_MD_StartData
wait 5
if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN
write "<*> Passed - Event message ",$SC_$CPU_find_event[1].eventid, " received"
else
write "<!> Failed - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", TST_MD_STARTDATA_INF_EID, "."
endif
ut_tlmwait $SC_$CPU_TST_MD_DATASTATE, 1
IF (UT_TW_Status = UT_Success) THEN
write "<*> Passed - Test data started"
else
write "<!> Failed - Test data was not started!"
endif
write ";*********************************************************************"
write "; Step 4.1.3: Verify that each MD dwell load table was restored. "
write ";*********************************************************************"
FOR i = 1 to MD_NUM_DWELL_TABLES DO
; Dump the dwell table
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_WRITE_DUMP_INF_EID, INFO, 1
tableName = MDAppName & ".DWELL_TABLE" & i
dumpFileName = "$cpu_tbl" & i & "symdmp413"
if (i = 1) then
loadPktId = dwell_tbl1_load_pkt
elseif (i = 2) then
loadPktId = dwell_tbl2_load_pkt
elseif (i = 3) then
loadPktId = dwell_tbl3_load_pkt
else
loadPktId = dwell_tbl4_load_pkt
endif
cmdcnt = $SC_$CPU_TBL_CMDPC+1
s get_tbl_to_cvt (ramDir,tableName,"A",dumpFileName,hostCPU,loadPktId)
ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdcnt}
if (UT_TW_Status <> UT_Success) then
write "<!> Failed: Dump command for Dwell Table ",i,"."
endif
; Check for event message
if ($SC_$CPU_find_event[1].num_found_messages != 1) then
if ($SC_$CPU_evs_eventid <> CFE_TBL_OVERWRITE_DUMP_INF_EID) then
write "<!> Failed: Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",CFE_TBL_WRITE_DUMP_INF_EID, "."
endif
endif
passed = 1
;; Compare the table Enabled Flag
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Enabled"
if (tbl_enaFlag[i] <> {dataName}) then
passed = 0
write "<!> Failed - Enable Flag expected for Tbl #",i," = ",tbl_enaFlag[i],"; Tbl value = ",{dataName}
endif
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Signature"
if (tbl_signature[i] <> {dataName}) then
passed = 0
write "<!> Failed - Signature expected for Tbl #",i," = ",tbl_signature[i],"; Tbl value = ",{dataName}
endif
;; loop for each table entry
for j = 1 to MD_DWELL_TABLE_SIZE do
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_Length"
if (tbl_length[i,j] <> {dataName}) then
passed = 0
write "<!> Failed - entry[",i,",",j,"] expected length = ",tbl_length[i,j],"; Tbl value = ",{dataName}
endif
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_Delay"
if (tbl_delay[i,j] <> {dataName}) then
passed = 0
write "<!> Failed - entry[",i,",",j,"] expected delay = ",tbl_delay[i,j],"; Tbl value = ",{dataName}
endif
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_Offset"
if (tbl_offset[i,j] <> {dataName}) then
passed = 0
write "<!> Failed - entry[",i,",",j,"] expected offset = ",tbl_offset[i,j],"; Tbl value = ",{dataName}
endif
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_SymName"
if (tbl_symName[i,j] <> {dataName}) then
passed = 0
write "<!> Failed - entry[",i,",",j,"] expected symName = ",tbl_symName[i,j],"; Tbl value = ",{dataName}
endif
enddo
if (passed = 1) then
write "<*> Passed - Load Tbl #",i," was restored properly after reset."
else
write "<!> Failed - Load Tbl #",i," was not preserved across the reset."
endif
ENDDO
write ";*********************************************************************"
write "; Step 4.1.4: Verify that enabled state was restored for each dwell "
write ";*********************************************************************"
; Check MD_EnableMask
if ($SC_$CPU_MD_EnableMask = b'0111') then
write "<*> Passed (9003,9004) - Dwell Tables were restarted."
ut_setrequirements MD_9003, "P"
ut_setrequirements MD_9004, "P"
else
write "<!> Failed (9003,9004) - MD_EnableMask is not the expected value!"
ut_setrequirements MD_9003, "F"
ut_setrequirements MD_9004, "F"
; Start the tables so we can finish the test
/$SC_$CPU_MD_StartDwell TableMask=b'0111'
wait 5
endif
write ";*********************************************************************"
write "; Step 4.1.5: Verify that the HK entries were restored for each tbl."
write ";*********************************************************************"
; FIRST table should have address count 12, rate 4 and data size 30
if ($SC_$CPU_MD_AddrCnt[1] = 12) and ($SC_$CPU_MD_Rate[1] = 4) and ($SC_$CPU_MD_DataSize[1] = 30) THEN
write "<*> Passed (9003,9004) - FIRST Dwell Table has correct address count, rate and data size!"
ut_setrequirements MD_9003, "P"
ut_setrequirements MD_9004, "P"
else
write "<!> Failed (9003,9004) - FIRST Dwell Table does not have correct address count, rate and data size!"
write "$SC_$CPU_MD_AddrCnt[1] = ", $SC_$CPU_MD_AddrCnt[1], " (Expected 12)"
write "$SC_$CPU_MD_Rate[1] = ", $SC_$CPU_MD_Rate[1], " (Expected 4)"
write "$SC_$CPU_MD_DataSize[1] = ", $SC_$CPU_MD_DataSize[1], " (Expected 30)"
ut_setrequirements MD_9003, "F"
ut_setrequirements MD_9004, "F"
endif
; SECOND table should have address count 2, rate 4 and data size 6 - it was not modified
if ($SC_$CPU_MD_AddrCnt[2] = 2) and ($SC_$CPU_MD_Rate[2] = 4) and ($SC_$CPU_MD_DataSize[2] = 6) THEN
write "<*> Passed (9003,9004) - SECOND Dwell Table has correct address count, rate and data size!"
ut_setrequirements MD_9003, "P"
ut_setrequirements MD_9004, "P"
else
write "<!> Failed (9003,9004) - SECOND Dwell Table does not have correct address count, rate and data size!"
write "$SC_$CPU_MD_AddrCnt[2] = ", $SC_$CPU_MD_AddrCnt[2], " (Expected 2)"
write "$SC_$CPU_MD_Rate[2] = ", $SC_$CPU_MD_Rate[2], " (Expected 2)"
write "$SC_$CPU_MD_DataSize[2] = ", $SC_$CPU_MD_DataSize[2], " (Expected 6)"
ut_setrequirements MD_9003, "F"
ut_setrequirements MD_9004, "F"
endif
; THIRD table should have address count 3, rate 2 and data size 8
if ($SC_$CPU_MD_AddrCnt[3] = 3) and ($SC_$CPU_MD_Rate[3] = 2) and ($SC_$CPU_MD_DataSize[3] = 8) THEN
write "<*> Passed (9003,9004) - THIRD Dwell Table has correct address count, rate and data size!"
ut_setrequirements MD_9003, "P"
ut_setrequirements MD_9004, "P"
else
write "<!> Failed (9003,9004) - THIRD Dwell Table does not have correct address count, rate and data size!"
write "$SC_$CPU_MD_AddrCnt[3] = ", $SC_$CPU_MD_AddrCnt[3], " (Expected 3)"
write "$SC_$CPU_MD_Rate[3] = ", $SC_$CPU_MD_Rate[3], " (Expected 2)"
write "$SC_$CPU_MD_DataSize[3] = ", $SC_$CPU_MD_DataSize[3], " (Expected 8)"
ut_setrequirements MD_9003, "F"
ut_setrequirements MD_9004, "F"
endif
; LAST table should have address count 2, rate 1 and data size 2
if ($SC_$CPU_MD_AddrCnt[4] = 2) and ($SC_$CPU_MD_Rate[4] = 1) and ($SC_$CPU_MD_DataSize[4] = 2) THEN
write "<*> Passed (9003,9004) - LAST Dwell Table has correct address count, rate and data size!"
ut_setrequirements MD_9003, "P"
ut_setrequirements MD_9004, "P"
else
write "<!> Failed (9003,9004) - LAST Dwell Table does not have correct address count, rate and data size!"
write "$SC_$CPU_MD_AddrCnt[4] = ", $SC_$CPU_MD_AddrCnt[4], " (Expected 2)"
write "$SC_$CPU_MD_Rate[4] = ", $SC_$CPU_MD_Rate[4], " (Expected 1)"
write "$SC_$CPU_MD_DataSize[4] = ", $SC_$CPU_MD_DataSize[4], " (Expected 2)"
ut_setrequirements MD_9003, "F"
ut_setrequirements MD_9004, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 4.1.6: Verify that memory dwell messages are received at the"
write "; proper rate and with the correct number of entries "
write ";*********************************************************************"
write "; Table 1: Verify that memory dwell messages are received at"
write "; the proper rate and contain the correct number of entries"
write ";********************************************************************"
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Wait up to about 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt1_appid & "scnt"}
while ({"p" & dwell_pkt1_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
%liv (log_procedure) = logging
; Verify table id of the packet
IF ($SC_$CPU_MD_DwlPkt1TableId = 1) THEN
write "<*> Passed (3001) - Dwell packet contains ID for table 1"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet not received or packet does not contain ID for table 1!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of addresses of the packet
IF ($SC_$CPU_MD_DwlPkt1NumAddresses = 12) THEN
write "<*> Passed (3001) - Dwell packet for table 1 has correct number of addresses"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 1 does NOT have correct number of addresses!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of bytes of data of the packet
IF ($sc_$cpu_MD_DwlPkt1PktDataSize = 30) THEN
write "<*> Passed (3001) - Dwell packet for table 1 has correct data size"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 1 does NOT have correct data size!"
ut_setrequirements MD_3001, "F"
endif
; Verify rate of the packet
IF ($sc_$cpu_MD_DwlPkt1Rate = 4) THEN
write "<*> Passed (3001) - Dwell packet for table 1 has correct data rate"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 1 does NOT have correct data rate!"
ut_setrequirements MD_3001, "F"
endif
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Clear the local data
for i = 1 to 15 do
for j = 1 to 34 do
dwelldata[i,j] = 0
enddo
enddo
; Collect data 15 times
for i = 1 to 15 do
; Wait up to 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt1_appid & "scnt"}
while ({"p" & dwell_pkt1_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
; Collect the data from the packet
for j = 1 to 34 do
dwelldata[i,j] = $SC_$CPU_MD_DwlPkt1DwellData[j]
enddo
enddo
%liv (log_procedure) = logging
for j = 1 to 34 do
write "Byte ", j, "; 1:", dwelldata[1,j], " 2:", dwelldata[2,j], " 3:", dwelldata[3,j], " 4:", dwelldata[4,j], " 5:", dwelldata[5,j], " 6:", dwelldata[6,j], " 7:", dwelldata[7,j], " 8:", dwelldata[8,j], " 9:", dwelldata[9,j], " 10:", dwelldata[10,j], " 11:", dwelldata[11,j], " 12:", dwelldata[12,j], " 13:", dwelldata[13,j], " 14:", dwelldata[14,j], " 15:", dwelldata[15,j]
enddo
; Check the data - since the delay for this dwell table is 4 and the values
; are incrementing once per second, each collected data point should be 4 more
; than the previous one. The data in bytes 31 through 34 should remain 0
; throughout.
passed = 1
if (dwelldata[1,31] <> 0) or (dwelldata[1,32] <> 0) or (dwelldata[1,33] <> 0) or (dwelldata[1,34] <> 0) then
write "<!> FAILED at start - end of data not 0!"
passed = 0
endif
for i = 2 to 15 do
for j = 1 to 30 do
if (dwelldata[i-1,j] >= 252) then
if (dwelldata[i,j] <> dwelldata[i-1,j] - 252) then
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] <> (dwelldata[i-1,j] + 4)) THEN
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
endif
enddo
if (dwelldata[i,31] <> 0) or (dwelldata[i,32] <> 0) or (dwelldata[i,33] <> 0) or (dwelldata[i,34] <> 0) then
write "<!> FAILED at entry #", i, " - end of data not 0!"
passed = 0
endif
enddo
if (passed = 1) then
write "<*> Passed (3000;3000.1;3001) - Data was as expected and received at the correct rate."
ut_setrequirements MD_3000, "P"
ut_setrequirements MD_3000_1, "P"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3000;3000.1;3001) - Data was NOT as expected and/or not received at the correct rate!"
ut_setrequirements MD_3000, "F"
ut_setrequirements MD_3000_1, "F"
ut_setrequirements MD_3001, "F"
endif
wait 5
write ";********************************************************************"
write "; Table 2: Verify that memory dwell messages are received at"
write "; the proper rate and contain only one entry each"
write ";********************************************************************"
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Wait up to about 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt2_appid & "scnt"}
while ({"p" & dwell_pkt2_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
%liv (log_procedure) = logging
; Verify table id of the packet
IF ($SC_$CPU_MD_DwlPkt2TableId = 2) THEN
write "<*> Passed (3001) - Dwell packet contains ID for table 2"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet not received or packet does not contain ID for table 2!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of addresses of the packet
IF ($SC_$CPU_MD_DwlPkt2NumAddresses = 2) THEN
write "<*> Passed (3001) - Dwell packet for table 2 has correct number of addresses"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 2 does NOT have correct number of addresses!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of bytes of data of the packet
IF ($sc_$cpu_MD_DwlPkt2PktDataSize = 6) THEN
write "<*> Passed (3001) - Dwell packet for table 2 has correct data size"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 2 does NOT have correct data size!"
ut_setrequirements MD_3001, "F"
endif
; Verify rate of the packet
IF ($sc_$cpu_MD_DwlPkt2Rate = 4) THEN
write "<*> Passed (3001) - Dwell packet for table 2 has correct data rate"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 2 does NOT have correct data rate!"
ut_setrequirements MD_3001, "F"
endif
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Verify that the data increments by 2
; Clear the local data
for i = 1 to 15 do
for j = 1 to 10 do
dwelldata[i,j] = 0
enddo
enddo
; Collect data 15 times
for i = 1 to 15 do
; Wait up to 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt2_appid & "scnt"}
while ({"p" & dwell_pkt2_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
; Collect the data from the packet
for j = 1 to 10 do
dwelldata[i,j] = $SC_$CPU_MD_DwlPkt2DwellData[j]
enddo
enddo
%liv (log_procedure) = logging
for j = 1 to 10 do
write "Byte ", j, "; 1:", dwelldata[1,j], " 2:", dwelldata[2,j], " 3:", dwelldata[3,j], " 4:", dwelldata[4,j], " 5:", dwelldata[5,j], " 6:", dwelldata[6,j], " 7:", dwelldata[7,j], " 8:", dwelldata[8,j], " 9:", dwelldata[9,j], " 10:", dwelldata[10,j], " 11:", dwelldata[11,j], " 12:", dwelldata[12,j], " 13:", dwelldata[13,j], " 14:", dwelldata[14,j], " 15:", dwelldata[15,j]
enddo
; Check the data - since the delay for this dwell table is 4 and the values
; are incrementing once per second, each collected data point should be 4 more
; than the previous one. The data in bytes 7 through 10 should remain 0
; throughout.
passed = 1
if (dwelldata[1,7] <> 0) or (dwelldata[1,8] <> 0) or (dwelldata[1,9] <> 0) or (dwelldata[1,10] <> 0) then
write "<!> FAILED at start - end of data not 0!"
passed = 0
endif
for i = 2 to 15 do
for j = 1 to 6 do
if (dwelldata[i-1,j] >= 252) then
if (dwelldata[i,j] <> dwelldata[i-1,j] - 252) then
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] <> (dwelldata[i-1,j] + 4)) THEN
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
endif
enddo
if (dwelldata[i,7] <> 0) or (dwelldata[i,8] <> 0) or (dwelldata[i,9] <> 0) or (dwelldata[i,10] <> 0) then
write "<!> FAILED at entry #", i, " - end of data not 0!"
passed = 0
endif
enddo
if (passed = 1) then
write "<*> Passed (3000;3000.2;3001) - Data was as expected and received at the correct rate."
ut_setrequirements MD_3000, "P"
ut_setrequirements MD_3000_2, "P"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3000;3000.2;3001) - Data was NOT as expected and/or not received at the correct rate!"
ut_setrequirements MD_3000, "F"
ut_setrequirements MD_3000_2, "F"
ut_setrequirements MD_3001, "F"
endif
wait 5
write ";********************************************************************"
write "; Table 3: Verify that memory dwell messages are received at"
write "; the proper rate and contain only one entry each"
write ";********************************************************************"
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Wait up to about 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt3_appid & "scnt"}
while ({"p" & dwell_pkt3_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
%liv (log_procedure) = logging
; Verify table id of the packet
IF ($SC_$CPU_MD_DwlPkt3TableId = 3) THEN
write "<*> Passed (3001) - Dwell packet contains ID for table 3"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet not received or packet does not contain ID for table 3!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of addresses of the packet
IF ($SC_$CPU_MD_DwlPkt3NumAddresses = 3) THEN
write "<*> Passed (3001) - Dwell packet for table 3 has correct number of addresses"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 3 does NOT have correct number of addresses!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of bytes of data of the packet
IF ($sc_$cpu_MD_DwlPkt3PktDataSize = 8) THEN
write "<*> Passed (3001) - Dwell packet for table 3 has correct data size"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 3 does NOT have correct data size!"
ut_setrequirements MD_3001, "F"
endif
; Verify rate of the packet
IF ($sc_$cpu_MD_DwlPkt3Rate = 2) THEN
write "<*> Passed (3001) - Dwell packet for table 3 has correct data rate"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 3 does NOT have correct data rate!"
ut_setrequirements MD_3001, "F"
endif
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Verify that the data increments by 2
; Clear the local data
for i = 1 to 15 do
for j = 1 to 12 do
dwelldata[i,j] = 0
enddo
enddo
; Collect data 15 times
for i = 1 to 15 do
; Wait up to 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt3_appid & "scnt"}
while ({"p" & dwell_pkt3_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
; Collect the data from the packet
for j = 1 to 12 do
dwelldata[i,j] = $SC_$CPU_MD_DwlPkt3DwellData[j]
enddo
enddo
%liv (log_procedure) = logging
for j = 1 to 12 do
write "Byte ", j, "; 1:", dwelldata[1,j], " 2:", dwelldata[2,j], " 3:", dwelldata[3,j], " 4:", dwelldata[4,j], " 5:", dwelldata[5,j], " 6:", dwelldata[6,j], " 7:", dwelldata[7,j], " 8:", dwelldata[8,j], " 9:", dwelldata[9,j], " 10:", dwelldata[10,j], " 11:", dwelldata[11,j], " 12:", dwelldata[12,j], " 13:", dwelldata[13,j], " 14:", dwelldata[14,j], " 15:", dwelldata[15,j]
enddo
; Check the data - since the delay for this dwell table is 2 and the values
; are incrementing once per second, each collected data point should be 2 more
; than the previous one. The data in bytes 9 through 12 should remain 0
; throughout.
passed = 1
if (dwelldata[1,9] <> 0) or (dwelldata[1,10] <> 0) or (dwelldata[1,11] <> 0) or (dwelldata[1,12] <> 0) then
write "<!> FAILED at start - end of data not 0!"
passed = 0
endif
for i = 2 to 15 do
for j = 1 to 6 do
if (dwelldata[i-1,j] >= 254) then
if (dwelldata[i,j] <> dwelldata[i-1,j] - 254) then
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] <> (dwelldata[i-1,j] + 2)) THEN
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
endif
enddo
if (dwelldata[i,9] <> 0) or (dwelldata[i,10] <> 0) or (dwelldata[i,11] <> 0) or (dwelldata[i,12] <> 0) then
write "<!> FAILED at entry #", i, " - end of data not 0!"
passed = 0
endif
enddo
if (passed = 1) then
write "<*> Passed (3000;3000.2;3001) - Data was as expected and received at the correct rate."
ut_setrequirements MD_3000, "P"
ut_setrequirements MD_3000_2, "P"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3000;3000.2;3001) - Data was NOT as expected and/or not received at the correct rate!"
ut_setrequirements MD_3000, "F"
ut_setrequirements MD_3000_2, "F"
ut_setrequirements MD_3001, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 4.2: MD Application Reset "
write ";********************************************************************"
write "; Step 4.2.1: Dump the Load Tables before performing an Application "
write "; Reset in order to verify the tables were restored."
write ";********************************************************************"
;; Dump each Dwell Table
for i = 1 to MD_NUM_DWELL_TABLES do
; Dump the dwell table
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_WRITE_DUMP_INF_EID, INFO, 1
tableName = MDAppName & ".DWELL_TABLE" & i
dumpFileName = "$cpu_tbl" & i & "symdmp421"
if (i = 1) then
loadPktId = dwell_tbl1_load_pkt
elseif (i = 2) then
loadPktId = dwell_tbl2_load_pkt
elseif (i = 3) then
loadPktId = dwell_tbl3_load_pkt
else
loadPktId = dwell_tbl4_load_pkt
endif
cmdcnt = $SC_$CPU_TBL_CMDPC+1
s get_tbl_to_cvt (ramDir,tableName,"A",dumpFileName,hostCPU,loadPktId)
ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdcnt}
if (UT_TW_Status <> UT_Success) then
write "<!> Failed: Dump command for Dwell Table ",i,"."
endif
; Check for event message
if ($SC_$CPU_find_event[1].num_found_messages != 1) then
if ($SC_$CPU_evs_eventid <> CFE_TBL_OVERWRITE_DUMP_INF_EID) then
write "<!> Failed: Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",CFE_TBL_WRITE_DUMP_INF_EID, "."
endif
endif
;; Store the table data
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Enabled"
tbl_enaFlag[i] = {dataName}
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Signature"
tbl_signature[i] = {dataName}
;; loop for each table entry
for j = 1 to MD_DWELL_TABLE_SIZE do
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_Length"
tbl_length[i,j] = {dataName}
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_Delay"
tbl_delay[i,j] = {dataName}
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_Offset"
tbl_offset[i,j] = {dataName}
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_SymName"
tbl_symName[i,j] = {dataName}
enddo
enddo
write ";********************************************************************"
write "; Step 4.2.2: Send MD Application Reset command"
write ";********************************************************************"
ut_setupevents "$SC","$CPU","CFE_ES", CFE_ES_RESTART_APP_INF_EID, "INFO", 1
ut_setupevents "$SC","$CPU",{MDAppName},MD_RECOVERED_TBL_VALID_INF_EID,"INFO", 2
ut_setupevents "$SC","$CPU",{MDAppName},MD_INIT_INF_EID, "INFO", 3
/$SC_$CPU_ES_RESTARTAPP APPLICATION=MDAppName
; Wait for table recovery events
ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 4
IF (UT_TW_Status = UT_Success) THEN
write "<*> Passed (9004) - All MD Dwell Table recovery messages were received"
ut_setrequirements MD_9004, "P"
else
write "<!> Failed (9004) - Not all of the MD Dwell Table recovery messages were received!"
ut_setrequirements MD_9004, "F"
endif
; Wait for app startup events
ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1
IF (UT_TW_Status = UT_Success) THEN
if ($SC_$CPU_find_event[1].num_found_messages = 1) then
write "<*> Passed - MD Application Started"
else
write "<!> Failed - CFE_ES restart app Event Message for MD not received."
endif
else
write "<!> Failed - MD Application start Event Message not received."
endif
wait 5
;;; Need to set the stream based upon the cpu being used
;; CPU1 is the default
stream1 = x'92D'
write "Sending command to add subscription for TST_MD HK packet."
/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
wait 2
write "Opening TST MD HK Page."
page $SC_$CPU_TST_MD_HK
wait 5
write "; Enable DEBUG Event Messages "
cmdcnt = $SC_$CPU_EVS_CMDPC + 2
;; Enable DEBUG events for the MD and CFE_TBL applications ONLY
/$SC_$CPU_EVS_EnaAppEVTType Application=MDAppName DEBUG
wait 2
/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_TBL" DEBUG
ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed - Enable Debug events command sent properly."
else
write "<!> Failed - Enable Debug events command."
endif
write "; Verify that the MD Housekeeping telemetry items are "
write "; initialized to zero (0). "
;; Check the MD tlm items to see if they are 0 or NULL
if ($SC_$CPU_MD_CMDPC = 0) AND ($SC_$CPU_MD_CMDEC = 0) THEN
write "<*> Passed (9000) - Housekeeping telemetry initialized properly."
ut_setrequirements MD_9000, "P"
else
write "<!> Failed (9000) - Housekeeping telemetry NOT initialized at startup."
write " CMDPC = ",$SC_$CPU_MD_CMDPC
write " CMDEC = ",$SC_$CPU_MD_CMDEC
ut_setrequirements MD_9000, "F"
endif
wait 5
; get the address of the test data area
testdata_addr = $SC_$CPU_TST_MD_TSTDATAADR
write ";*********************************************************************"
write "; Step 4.2.3: Verify that each MD dwell load table was restored. "
write ";*********************************************************************"
FOR i = 1 to MD_NUM_DWELL_TABLES DO
; Dump the dwell table
ut_setupevents $SC, $CPU, CFE_TBL, CFE_TBL_WRITE_DUMP_INF_EID, INFO, 1
tableName = MDAppName & ".DWELL_TABLE" & i
dumpFileName = "$cpu_tbl" & i & "symdmp423"
if (i = 1) then
loadPktId = dwell_tbl1_load_pkt
elseif (i = 2) then
loadPktId = dwell_tbl2_load_pkt
elseif (i = 3) then
loadPktId = dwell_tbl3_load_pkt
else
loadPktId = dwell_tbl4_load_pkt
endif
cmdcnt = $SC_$CPU_TBL_CMDPC+1
s get_tbl_to_cvt (ramDir,tableName,"A",dumpFileName,hostCPU,loadPktId)
ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdcnt}
if (UT_TW_Status <> UT_Success) then
write "<!> Failed: Dump command for Dwell Table ",i,"."
endif
; Check for event message
if ($SC_$CPU_find_event[1].num_found_messages != 1) then
if ($SC_$CPU_evs_eventid <> CFE_TBL_OVERWRITE_DUMP_INF_EID) then
write "<!> Failed: Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",CFE_TBL_WRITE_DUMP_INF_EID, "."
endif
endif
passed = 1
;; Compare the table Enabled Flag
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Enabled"
if (tbl_enaFlag[i] <> {dataName}) then
passed = 0
write "<!> Failed - Enable Flag expected for Tbl #",i," = ",tbl_enaFlag[i],"; Tbl value = ",{dataName}
endif
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Signature"
if (tbl_signature[i] <> {dataName}) then
passed = 0
write "<!> Failed - Signature expected for Tbl #",i," = ",tbl_signature[i],"; Tbl value = ",{dataName}
endif
;; loop for each table entry
for j = 1 to MD_DWELL_TABLE_SIZE do
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_Length"
if (tbl_length[i,j] <> {dataName}) then
passed = 0
write "<!> Failed - entry[",i,",",j,"] expected length = ",tbl_length[i,j],"; Tbl value = ",{dataName}
endif
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_Delay"
if (tbl_delay[i,j] <> {dataName}) then
passed = 0
write "<!> Failed - entry[",i,",",j,"] expected delay = ",tbl_delay[i,j],"; Tbl value = ",{dataName}
endif
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_Offset"
if (tbl_offset[i,j] <> {dataName}) then
passed = 0
write "<!> Failed - entry[",i,",",j,"] expected offset = ",tbl_offset[i,j],"; Tbl value = ",{dataName}
endif
dataName = "$SC_$CPU_MD_Dwell_Load_Tbl" & i & ".MD_DTL_Entry[" & j & "].MD_TLE_SymName"
if (tbl_symName[i,j] <> {dataName}) then
passed = 0
write "<!> Failed - entry[",i,",",j,"] expected symName = ",tbl_symName[i,j],"; Tbl value = ",{dataName}
endif
enddo
if (passed = 1) then
write "<*> Passed - Load Tbl #",i," was restored properly after reset."
else
write "<!> Failed - Load Tbl #",i," was not preserved across the reset."
endif
ENDDO
write ";*********************************************************************"
write "; Step 4.2.4: Verify that enabled state was restored for each dwell "
write ";*********************************************************************"
; Check MD_EnableMask
if ($SC_$CPU_MD_EnableMask = b'0111') then
write "<*> Passed (9003,9004) - Dwell Tables were restarted."
ut_setrequirements MD_9003, "P"
ut_setrequirements MD_9004, "P"
else
write "<!> Failed (9003,9004) - MD_EnableMask is not the expected value!"
ut_setrequirements MD_9003, "F"
ut_setrequirements MD_9004, "F"
; Start the tables so we can finish the test
/$SC_$CPU_MD_StartDwell TableMask=b'0111'
wait 5
endif
/$SC_$CPU_MD_StartDwell TableMask=b'0111'
wait 10
write ";*********************************************************************"
write "; Step 4.2.5: Verify that the HK entries were restored for each tbl."
write ";*********************************************************************"
; FIRST table should have address count 12, rate 4 and data size 30
if ($SC_$CPU_MD_AddrCnt[1] = 12) and ($SC_$CPU_MD_Rate[1] = 4) and ($SC_$CPU_MD_DataSize[1] = 30) THEN
write "<*> Passed (9003,9004) - FIRST Dwell Table has correct address count, rate and data size!"
ut_setrequirements MD_9003, "P"
ut_setrequirements MD_9004, "P"
else
write "<!> Failed (9003,9004) - FIRST Dwell Table does not have correct address count, rate and data size!"
write "$SC_$CPU_MD_AddrCnt[1] = ", $SC_$CPU_MD_AddrCnt[1], " (Expected 12)"
write "$SC_$CPU_MD_Rate[1] = ", $SC_$CPU_MD_Rate[1], " (Expected 4)"
write "$SC_$CPU_MD_DataSize[1] = ", $SC_$CPU_MD_DataSize[1], " (Expected 30)"
ut_setrequirements MD_9003, "F"
ut_setrequirements MD_9004, "F"
endif
; SECOND table should have address count 2, rate 4 and data size 6 - it was not modified
if ($SC_$CPU_MD_AddrCnt[2] = 2) and ($SC_$CPU_MD_Rate[2] = 4) and ($SC_$CPU_MD_DataSize[2] = 6) THEN
write "<*> Passed (9003,9004) - SECOND Dwell Table has correct address count, rate and data size!"
ut_setrequirements MD_9003, "P"
ut_setrequirements MD_9004, "P"
else
write "<!> Failed (9003,9004) - SECOND Dwell Table does not have correct address count, rate and data size!"
write "$SC_$CPU_MD_AddrCnt[2] = ", $SC_$CPU_MD_AddrCnt[2], " (Expected 2)"
write "$SC_$CPU_MD_Rate[2] = ", $SC_$CPU_MD_Rate[2], " (Expected 2)"
write "$SC_$CPU_MD_DataSize[2] = ", $SC_$CPU_MD_DataSize[2], " (Expected 6)"
ut_setrequirements MD_9003, "F"
ut_setrequirements MD_9004, "F"
endif
; THIRD table should have address count 3, rate 2 and data size 8
if ($SC_$CPU_MD_AddrCnt[3] = 3) and ($SC_$CPU_MD_Rate[3] = 2) and ($SC_$CPU_MD_DataSize[3] = 8) THEN
write "<*> Passed (9003,9004) - THIRD Dwell Table has correct address count, rate and data size!"
ut_setrequirements MD_9003, "P"
ut_setrequirements MD_9004, "P"
else
write "<!> Failed (9003,9004) - THIRD Dwell Table does not have correct address count, rate and data size!"
write "$SC_$CPU_MD_AddrCnt[3] = ", $SC_$CPU_MD_AddrCnt[3], " (Expected 3)"
write "$SC_$CPU_MD_Rate[3] = ", $SC_$CPU_MD_Rate[3], " (Expected 2)"
write "$SC_$CPU_MD_DataSize[3] = ", $SC_$CPU_MD_DataSize[3], " (Expected 8)"
ut_setrequirements MD_9003, "F"
ut_setrequirements MD_9004, "F"
endif
; LAST table should have address count 2, rate 1 and data size 2
if ($SC_$CPU_MD_AddrCnt[4] = 2) and ($SC_$CPU_MD_Rate[4] = 1) and ($SC_$CPU_MD_DataSize[4] = 2) THEN
write "<*> Passed (9003,9004) - LAST Dwell Table has correct address count, rate and data size!"
ut_setrequirements MD_9003, "P"
ut_setrequirements MD_9004, "P"
else
write "<!> Failed (9003,9004) - LAST Dwell Table does not have correct address count, rate and data size!"
write "$SC_$CPU_MD_AddrCnt[4] = ", $SC_$CPU_MD_AddrCnt[4], " (Expected 2)"
write "$SC_$CPU_MD_Rate[4] = ", $SC_$CPU_MD_Rate[4], " (Expected 1)"
write "$SC_$CPU_MD_DataSize[4] = ", $SC_$CPU_MD_DataSize[4], " (Expected 2)"
ut_setrequirements MD_9003, "F"
ut_setrequirements MD_9004, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 4.2.6: Verify that memory dwell messages are received at the"
write "; proper rate and with the correct number of entries "
write ";*********************************************************************"
write "; Table 1: Verify that memory dwell messages are received at"
write "; the proper rate and contain the correct number of entries"
write ";********************************************************************"
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Wait up to about 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt1_appid & "scnt"}
while ({"p" & dwell_pkt1_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
%liv (log_procedure) = logging
; Verify table id of the packet
IF ($SC_$CPU_MD_DwlPkt1TableId = 1) THEN
write "<*> Passed (3001) - Dwell packet contains ID for table 1"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet not received or packet does not contain ID for table 1!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of addresses of the packet
IF ($SC_$CPU_MD_DwlPkt1NumAddresses = 12) THEN
write "<*> Passed (3001) - Dwell packet for table 1 has correct number of addresses"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 1 does NOT have correct number of addresses!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of bytes of data of the packet
IF ($sc_$cpu_MD_DwlPkt1PktDataSize = 30) THEN
write "<*> Passed (3001) - Dwell packet for table 1 has correct data size"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 1 does NOT have correct data size!"
ut_setrequirements MD_3001, "F"
endif
; Verify rate of the packet
IF ($sc_$cpu_MD_DwlPkt1Rate = 4) THEN
write "<*> Passed (3001) - Dwell packet for table 1 has correct data rate"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 1 does NOT have correct data rate!"
ut_setrequirements MD_3001, "F"
endif
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Clear the local data
for i = 1 to 15 do
for j = 1 to 34 do
dwelldata[i,j] = 0
enddo
enddo
; Collect data 15 times
for i = 1 to 15 do
; Wait up to 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt1_appid & "scnt"}
while ({"p" & dwell_pkt1_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
; Collect the data from the packet
for j = 1 to 34 do
dwelldata[i,j] = $SC_$CPU_MD_DwlPkt1DwellData[j]
enddo
enddo
%liv (log_procedure) = logging
for j = 1 to 34 do
write "Byte ", j, "; 1:", dwelldata[1,j], " 2:", dwelldata[2,j], " 3:", dwelldata[3,j], " 4:", dwelldata[4,j], " 5:", dwelldata[5,j], " 6:", dwelldata[6,j], " 7:", dwelldata[7,j], " 8:", dwelldata[8,j], " 9:", dwelldata[9,j], " 10:", dwelldata[10,j], " 11:", dwelldata[11,j], " 12:", dwelldata[12,j], " 13:", dwelldata[13,j], " 14:", dwelldata[14,j], " 15:", dwelldata[15,j]
enddo
; Check the data - since the delay for this dwell table is 4 and the values
; are incrementing once per second, each collected data point should be 4 more
; than the previous one. The data in bytes 31 through 34 should remain 0
; throughout.
passed = 1
if (dwelldata[1,31] <> 0) or (dwelldata[1,32] <> 0) or (dwelldata[1,33] <> 0) or (dwelldata[1,34] <> 0) then
write "<!> FAILED at start - end of data not 0!"
passed = 0
endif
for i = 2 to 15 do
for j = 1 to 30 do
if (dwelldata[i-1,j] >= 252) then
if (dwelldata[i,j] <> dwelldata[i-1,j] - 252) then
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] <> (dwelldata[i-1,j] + 4)) THEN
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
endif
enddo
if (dwelldata[i,31] <> 0) or (dwelldata[i,32] <> 0) or (dwelldata[i,33] <> 0) or (dwelldata[i,34] <> 0) then
write "<!> FAILED at entry #", i, " - end of data not 0!"
passed = 0
endif
enddo
if (passed = 1) then
write "<*> Passed (3000;3000.1;3001) - Data was as expected and received at the correct rate."
ut_setrequirements MD_3000, "P"
ut_setrequirements MD_3000_1, "P"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3000;3000.1;3001) - Data was NOT as expected and/or not received at the correct rate!"
ut_setrequirements MD_3000, "F"
ut_setrequirements MD_3000_1, "F"
ut_setrequirements MD_3001, "F"
endif
wait 5
write ";********************************************************************"
write "; Table 2: Verify that memory dwell messages are received at"
write "; the proper rate and contain only one entry each"
write ";********************************************************************"
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Wait up to about 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt2_appid & "scnt"}
while ({"p" & dwell_pkt2_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
%liv (log_procedure) = logging
; Verify table id of the packet
IF ($SC_$CPU_MD_DwlPkt2TableId = 2) THEN
write "<*> Passed (3001) - Dwell packet contains ID for table 2"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet not received or packet does not contain ID for table 2!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of addresses of the packet
IF ($SC_$CPU_MD_DwlPkt2NumAddresses = 2) THEN
write "<*> Passed (3001) - Dwell packet for table 2 has correct number of addresses"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 2 does NOT have correct number of addresses!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of bytes of data of the packet
IF ($sc_$cpu_MD_DwlPkt2PktDataSize = 6) THEN
write "<*> Passed (3001) - Dwell packet for table 2 has correct data size"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 2 does NOT have correct data size!"
ut_setrequirements MD_3001, "F"
endif
; Verify rate of the packet
IF ($sc_$cpu_MD_DwlPkt2Rate = 4) THEN
write "<*> Passed (3001) - Dwell packet for table 2 has correct data rate"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 2 does NOT have correct data rate!"
ut_setrequirements MD_3001, "F"
endif
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Verify that the data increments by 2
; Clear the local data
for i = 1 to 15 do
for j = 1 to 10 do
dwelldata[i,j] = 0
enddo
enddo
; Collect data 15 times
for i = 1 to 15 do
; Wait up to 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt2_appid & "scnt"}
while ({"p" & dwell_pkt2_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
; Collect the data from the packet
for j = 1 to 10 do
dwelldata[i,j] = $SC_$CPU_MD_DwlPkt2DwellData[j]
enddo
enddo
%liv (log_procedure) = logging
for j = 1 to 10 do
write "Byte ", j, "; 1:", dwelldata[1,j], " 2:", dwelldata[2,j], " 3:", dwelldata[3,j], " 4:", dwelldata[4,j], " 5:", dwelldata[5,j], " 6:", dwelldata[6,j], " 7:", dwelldata[7,j], " 8:", dwelldata[8,j], " 9:", dwelldata[9,j], " 10:", dwelldata[10,j], " 11:", dwelldata[11,j], " 12:", dwelldata[12,j], " 13:", dwelldata[13,j], " 14:", dwelldata[14,j], " 15:", dwelldata[15,j]
enddo
; Check the data - since the delay for this dwell table is 4 and the values
; are incrementing once per second, each collected data point should be 4 more
; than the previous one. The data in bytes 7 through 10 should remain 0
; throughout.
passed = 1
if (dwelldata[1,7] <> 0) or (dwelldata[1,8] <> 0) or (dwelldata[1,9] <> 0) or (dwelldata[1,10] <> 0) then
write "<!> FAILED at start - end of data not 0!"
passed = 0
endif
for i = 2 to 15 do
for j = 1 to 6 do
if (dwelldata[i-1,j] >= 252) then
if (dwelldata[i,j] <> dwelldata[i-1,j] - 252) then
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] <> (dwelldata[i-1,j] + 4)) THEN
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
endif
enddo
if (dwelldata[i,7] <> 0) or (dwelldata[i,8] <> 0) or (dwelldata[i,9] <> 0) or (dwelldata[i,10] <> 0) then
write "<!> FAILED at entry #", i, " - end of data not 0!"
passed = 0
endif
enddo
if (passed = 1) then
write "<*> Passed (3000;3000.2;3001) - Data was as expected and received at the correct rate."
ut_setrequirements MD_3000, "P"
ut_setrequirements MD_3000_2, "P"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3000;3000.2;3001) - Data was NOT as expected and/or not received at the correct rate!"
ut_setrequirements MD_3000, "F"
ut_setrequirements MD_3000_2, "F"
ut_setrequirements MD_3001, "F"
endif
wait 5
write ";********************************************************************"
write "; Table 3: Verify that memory dwell messages are received at"
write "; the proper rate and contain only one entry each"
write ";********************************************************************"
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Wait up to about 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt3_appid & "scnt"}
while ({"p" & dwell_pkt3_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
%liv (log_procedure) = logging
; Verify table id of the packet
IF ($SC_$CPU_MD_DwlPkt3TableId = 3) THEN
write "<*> Passed (3001) - Dwell packet contains ID for table 3"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet not received or packet does not contain ID for table 3!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of addresses of the packet
IF ($SC_$CPU_MD_DwlPkt3NumAddresses = 3) THEN
write "<*> Passed (3001) - Dwell packet for table 3 has correct number of addresses"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 3 does NOT have correct number of addresses!"
ut_setrequirements MD_3001, "F"
endif
; Verify number of bytes of data of the packet
IF ($sc_$cpu_MD_DwlPkt3PktDataSize = 8) THEN
write "<*> Passed (3001) - Dwell packet for table 3 has correct data size"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 3 does NOT have correct data size!"
ut_setrequirements MD_3001, "F"
endif
; Verify rate of the packet
IF ($sc_$cpu_MD_DwlPkt3Rate = 2) THEN
write "<*> Passed (3001) - Dwell packet for table 3 has correct data rate"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3001) - Dwell packet for table 3 does NOT have correct data rate!"
ut_setrequirements MD_3001, "F"
endif
;; Turn off logging
local logging = %liv (log_procedure)
%liv (log_procedure) = FALSE
; Verify that the data increments by 2
; Clear the local data
for i = 1 to 15 do
for j = 1 to 12 do
dwelldata[i,j] = 0
enddo
enddo
; Collect data 15 times
for i = 1 to 15 do
; Wait up to 10 seconds for dwell packet sequence count to change
cnt = 0
oldval = {"p" & dwell_pkt3_appid & "scnt"}
while ({"p" & dwell_pkt3_appid & "scnt"} = oldval) and (cnt < 40) do
cnt = cnt + 1
wait 0.25
enddo
; Collect the data from the packet
for j = 1 to 12 do
dwelldata[i,j] = $SC_$CPU_MD_DwlPkt3DwellData[j]
enddo
enddo
%liv (log_procedure) = logging
for j = 1 to 12 do
write "Byte ", j, "; 1:", dwelldata[1,j], " 2:", dwelldata[2,j], " 3:", dwelldata[3,j], " 4:", dwelldata[4,j], " 5:", dwelldata[5,j], " 6:", dwelldata[6,j], " 7:", dwelldata[7,j], " 8:", dwelldata[8,j], " 9:", dwelldata[9,j], " 10:", dwelldata[10,j], " 11:", dwelldata[11,j], " 12:", dwelldata[12,j], " 13:", dwelldata[13,j], " 14:", dwelldata[14,j], " 15:", dwelldata[15,j]
enddo
; Check the data - since the delay for this dwell table is 2 and the values
; are incrementing once per second, each collected data point should be 2 more
; than the previous one. The data in bytes 9 through 12 should remain 0
; throughout.
passed = 1
if (dwelldata[1,9] <> 0) or (dwelldata[1,10] <> 0) or (dwelldata[1,11] <> 0) or (dwelldata[1,12] <> 0) then
write "<!> FAILED at start - end of data not 0!"
passed = 0
endif
for i = 2 to 15 do
for j = 1 to 6 do
if (dwelldata[i-1,j] >= 254) then
if (dwelldata[i,j] <> dwelldata[i-1,j] - 254) then
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
else
if (dwelldata[i,j] <> (dwelldata[i-1,j] + 2)) THEN
write "<!> FAILED at (", i, ",", j, ")!!"
write "Previous value was: ", dwelldata[i-1,j]
write "This value was: ", dwelldata[i,j]
passed = 0
endif
endif
enddo
if (dwelldata[i,9] <> 0) or (dwelldata[i,10] <> 0) or (dwelldata[i,11] <> 0) or (dwelldata[i,12] <> 0) then
write "<!> FAILED at entry #", i, " - end of data not 0!"
passed = 0
endif
enddo
if (passed = 1) then
write "<*> Passed (3000;3000.2;3001) - Data was as expected and received at the correct rate."
ut_setrequirements MD_3000, "P"
ut_setrequirements MD_3000_2, "P"
ut_setrequirements MD_3001, "P"
else
write "<!> Failed (3000;3000.2;3001) - Data was NOT as expected and/or not received at the correct rate!"
ut_setrequirements MD_3000, "F"
ut_setrequirements MD_3000_2, "F"
ut_setrequirements MD_3001, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 4.3: Power On Reset "
write ";*********************************************************************"
write "; Step 4.3.1: Send Power On Reset command"
write ";********************************************************************"
/$SC_$CPU_ES_POWERONRESET
wait 10
close_data_center
wait 60
cfe_startup {hostCPU}
wait 5
write "; Start the Memory Dwell Test (TST_MD) Application and "
write "; add any required subscriptions. "
ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1
ut_setupevents "$SC", "$CPU", "TST_MD", TST_MD_INIT_INF_EID, "INFO", 2
s load_start_app ("TST_MD",hostCPU,"TST_MD_AppMain")
; Wait for app startup events
ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1
IF (UT_TW_Status = UT_Success) THEN
if ($SC_$CPU_find_event[1].num_found_messages = 1) then
write "<*> Passed - TST_MD Application Started"
else
write "<!> Failed - CFE_ES start Event Message for MD not received."
endif
else
write "<!> Failed - TST_MD Application start Event Message not received."
endif
;;; Need to set the stream based upon the cpu being used
;; CPU1 is the default
stream1 = x'92D'
write "Sending command to add subscription for TST_MD HK packet."
/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
wait 2
write "Opening TST MD HK Page."
page $SC_$CPU_TST_MD_HK
wait 5
; get the address of the test data area
testdata_addr = $SC_$CPU_TST_MD_TSTDATAADR
write "; Start the Memory Dwell (MD) Application and "
write "; add any required subscriptions. "
ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1
ut_setupevents "$SC", "$CPU", {MDAppName}, MD_INIT_INF_EID, "INFO", 2
s load_start_app (MDAppName,hostCPU,"MD_AppMain")
; Wait for app startup events
ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1
IF (UT_TW_Status = UT_Success) THEN
if ($SC_$CPU_find_event[1].num_found_messages = 1) then
write "<*> Passed - MD Application Started"
else
write "<!> Failed - CFE_ES start Event Message for MD not received."
endif
else
write "<!> Failed - MD Application start Event Message not received."
endif
;;; Need to set the stream based upon the cpu being used
;; CPU1 is the default
stream1 = x'890'
dwell1 = x'891'
dwell2 = x'892'
dwell3 = x'893'
dwell4 = x'894'
write "Sending commands to add subscriptions for MD HK and dwell packets."
/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
/$SC_$CPU_TO_ADDPACKET Stream=dwell1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
/$SC_$CPU_TO_ADDPACKET Stream=dwell2 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
wait 5
/$SC_$CPU_TO_ADDPACKET Stream=dwell3 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
/$SC_$CPU_TO_ADDPACKET Stream=dwell4 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4'
wait 10
write "Opening MD HK Page."
page $SC_$CPU_MD_HK
write "; Enable DEBUG Event Messages "
cmdcnt = $SC_$CPU_EVS_CMDPC + 2
;; Enable DEBUG events for the MD and CFE_TBL applications ONLY
/$SC_$CPU_EVS_EnaAppEVTType Application=MDAppName DEBUG
wait 2
/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_TBL" DEBUG
ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdcnt}
if (UT_TW_Status = UT_Success) then
write "<*> Passed - Enable Debug events command sent properly."
else
write "<!> Failed - Enable Debug events command."
endif
write "; Verify that the MD Housekeeping telemetry items are "
write "; initialized to zero (0). "
;; Check the HK tlm items to see if they are 0 or NULL
if ($SC_$CPU_MD_CMDPC = 0) AND ($SC_$CPU_MD_CMDEC = 0) THEN
write "<*> Passed (9000) - Housekeeping telemetry initialized properly."
ut_setrequirements MD_9000, "P"
else
write "<!> Failed (9000) - Housekeeping telemetry NOT initialized at startup."
write " CMDPC = ",$SC_$CPU_MD_CMDPC
write " CMDEC = ",$SC_$CPU_MD_CMDEC
ut_setrequirements MD_9000, "F"
endif
write ";*********************************************************************"
write "; Step 4.3.2: Verify that each MD table is disabled. "
write ";*********************************************************************"
if ($SC_$CPU_MD_EnableMask = 0) THEN
write "<*> Passed (9001) - Enable Mask initialized properly."
ut_setrequirements MD_9001, "P"
else
write "<!> Failed (9001) - Enable Mask was NOT initialized at startup."
write " EnableMask = ",$SC_$CPU_MD_EnableMask
ut_setrequirements MD_9001, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 4.3.3: Verify that each MD table is initialized to 0. "
write ";*********************************************************************"
passed = 1
FOR i = 1 to MD_NUM_DWELL_TABLES DO
if ($SC_$CPU_MD_AddrCnt[i] != 0) THEN
passed = 0
write "$SC_$CPU_MD_AddrCnt[", i, "] = ", $SC_$CPU_MD_AddrCnt[i]
endif
if ($SC_$CPU_MD_Rate[i] != 0) THEN
passed = 0
write "$SC_$CPU_MD_Rate[", i, "] = ", $SC_$CPU_MD_Rate[i]
endif
if ($SC_$CPU_MD_DataSize[i] != 0) THEN
passed = 0
write "$SC_$CPU_MD_DataSize[", i, "] = ", $SC_$CPU_MD_DataSize[i]
endif
if ($SC_$CPU_MD_DwPktOffset[i] != 0) THEN
passed = 0
write "$SC_$CPU_MD_DwPktOffset[", i, "] = ", $SC_$CPU_MD_DwPktOffset[i]
endif
if ($SC_$CPU_MD_DwTblEntry[i] != 0) THEN
passed = 0
write "$SC_$CPU_MD_DwTblEntry[", i, "] = ", $SC_$CPU_MD_DwTblEntry[i]
endif
ENDDO
if (passed = 1) THEN
write "<*> Passed (9002) - Memory Dwell tables initialized properly."
ut_setrequirements MD_9002, "P"
else
write "<!> Failed (9002) - Memory Dwell tables NOT initialized at startup."
ut_setrequirements MD_9002, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 4.3.4: Verify that each MD table has been returned to"
write "; its initialized state"
write ";*********************************************************************"
; Every table should now be empty
passed = 1
FOR i = 1 to MD_NUM_DWELL_TABLES DO
if ($SC_$CPU_MD_AddrCnt[i] = 0) and ($SC_$CPU_MD_Rate[i] = 0) and ($SC_$CPU_MD_DataSize[i] = 0) THEN
write "<*> Passed (9002) - Dwell Table ", i, " was cleared as expected!"
else
passed = 0
write "<!> Failed (9002) - Dwell Table ", i, " was not cleared!"
write "$SC_$CPU_MD_AddrCnt[",i,"] = ", $SC_$CPU_MD_AddrCnt[i], " (Expected 0)"
write "$SC_$CPU_MD_Rate[",i,"] = ", $SC_$CPU_MD_Rate[i], " (Expected 0)"
write "$SC_$CPU_MD_DataSize[",i,"] = ", $SC_$CPU_MD_DataSize[i], " (Expected 0)"
endif
ENDDO
if (passed = 1) THEN
write "<*> Passed (9002) - Memory Dwell tables initialized properly."
ut_setrequirements MD_9002, "P"
else
write "<!> Failed (9002) - Memory Dwell tables NOT initialized at startup."
ut_setrequirements MD_9002, "F"
endif
wait 5
write ";*********************************************************************"
write "; Step 5.0: Clean-up from this test."
write ";*********************************************************************"
/$SC_$CPU_ES_POWERONRESET
wait 10
close_data_center
wait 60
cfe_startup {hostCPU}
wait 5
write "**** Requirements Status Reporting"
write "--------------------------"
write " Requirement(s) Report"
write "--------------------------"
FOR i = 0 to ut_req_array_size DO
ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]}
ENDDO
drop ut_requirement ; needed to clear global variables
drop ut_req_array_size ; needed to clear global variables
write "Closing MD HK Page."
clear $SC_$CPU_MD_HK
write "Closing TST MD HK Page."
clear $SC_$CPU_TST_MD_HK
write "Closing Dwell Packet Pages."
clear $sc_$cpu_md_dwell_pkt1
clear $sc_$cpu_md_dwell_pkt2
clear $sc_$cpu_md_dwell_pkt3
clear $sc_$cpu_md_dwell_pkt4
write ";*********************************************************************"
write "; End procedure $SC_$CPU_md_SymTab "
write ";*********************************************************************"
ENDPROC
|
-- Revert clients
BEGIN;
DROP TABLE clients;
COMMIT;
|
<reponame>compty001/lemon
-------------------------------------------------------------------------------
-- model item
-------------------------------------------------------------------------------
CREATE TABLE MODEL_ITEM(
ID BIGINT AUTO_INCREMENT,
CODE VARCHAR(50),
VALUE VARCHAR(200),
TYPE VARCHAR(50),
SCHEMA_ID BIGINT,
BASE_ID BIGINT,
ROW_ID BIGINT,
TENANT_ID VARCHAR(64),
CONSTRAINT PK_MODEL_ITEM PRIMARY KEY(ID),
CONSTRAINT FK_MODEL_ITEM_SCHEMA FOREIGN KEY(SCHEMA_ID) REFERENCES MODEL_SCHEMA(ID),
CONSTRAINT FK_MODEL_ITEM_BASE FOREIGN KEY(BASE_ID) REFERENCES MODEL_BASE(ID),
CONSTRAINT FK_MODEL_ITEM_ROW FOREIGN KEY(ROW_ID) REFERENCES MODEL_ROW(ID)
) ENGINE=INNODB CHARSET=UTF8;
|
use test_db;
insert into test_mysql_restart_with_inc_mode values(101, 'name101', 111.111, 10100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,101]');
insert into test_mysql_restart_with_inc_mode values(102, 'name102', 112.111, 10200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,102]');
insert into test_mysql_restart_with_inc_mode values(103, 'name103', 113.111, 10300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,103]');
insert into test_mysql_restart_with_inc_mode values(104, 'name104', 114.111, 10400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,104]');
insert into test_mysql_restart_with_inc_mode values(105, 'name105', 115.111, 10500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,105]');
insert into test_mysql_restart_with_inc_mode values(106, 'name106', 116.111, 10600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,106]');
insert into test_mysql_restart_with_inc_mode values(107, 'name107', 117.111, 10700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,107]');
insert into test_mysql_restart_with_inc_mode values(108, 'name108', 118.111, 10800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,108]');
insert into test_mysql_restart_with_inc_mode values(109, 'name109', 119.111, 10900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,109]');
insert into test_mysql_restart_with_inc_mode values(110, 'name110', 120.111, 11000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,110]');
insert into test_mysql_restart_with_inc_mode values(111, 'name111', 121.111, 11100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,111]');
insert into test_mysql_restart_with_inc_mode values(112, 'name112', 122.111, 11200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,112]');
insert into test_mysql_restart_with_inc_mode values(113, 'name113', 123.111, 11300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,113]');
insert into test_mysql_restart_with_inc_mode values(114, 'name114', 124.111, 11400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,114]');
insert into test_mysql_restart_with_inc_mode values(115, 'name115', 125.111, 11500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,115]');
insert into test_mysql_restart_with_inc_mode values(116, 'name116', 126.111, 11600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,116]');
insert into test_mysql_restart_with_inc_mode values(117, 'name117', 127.111, 11700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,117]');
insert into test_mysql_restart_with_inc_mode values(118, 'name118', 128.111, 11800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,118]');
insert into test_mysql_restart_with_inc_mode values(119, 'name119', 129.111, 11900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,119]');
insert into test_mysql_restart_with_inc_mode values(120, 'name120', 130.111, 12000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,120]');
insert into test_mysql_restart_with_inc_mode values(121, 'name121', 131.111, 12100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,121]');
insert into test_mysql_restart_with_inc_mode values(122, 'name122', 132.111, 12200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,122]');
insert into test_mysql_restart_with_inc_mode values(123, 'name123', 133.111, 12300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,123]');
insert into test_mysql_restart_with_inc_mode values(124, 'name124', 134.111, 12400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,124]');
insert into test_mysql_restart_with_inc_mode values(125, 'name125', 135.111, 12500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,125]');
insert into test_mysql_restart_with_inc_mode values(126, 'name126', 136.111, 12600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,126]');
insert into test_mysql_restart_with_inc_mode values(127, 'name127', 137.111, 12700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,127]');
insert into test_mysql_restart_with_inc_mode values(128, 'name128', 138.111, 12800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,128]');
insert into test_mysql_restart_with_inc_mode values(129, 'name129', 139.111, 12900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,129]');
insert into test_mysql_restart_with_inc_mode values(130, 'name130', 140.111, 13000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,130]');
insert into test_mysql_restart_with_inc_mode values(131, 'name131', 141.111, 13100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,131]');
insert into test_mysql_restart_with_inc_mode values(132, 'name132', 142.111, 13200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,132]');
insert into test_mysql_restart_with_inc_mode values(133, 'name133', 143.111, 13300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,133]');
insert into test_mysql_restart_with_inc_mode values(134, 'name134', 144.111, 13400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,134]');
insert into test_mysql_restart_with_inc_mode values(135, 'name135', 145.111, 13500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,135]');
insert into test_mysql_restart_with_inc_mode values(136, 'name136', 146.111, 13600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,136]');
insert into test_mysql_restart_with_inc_mode values(137, 'name137', 147.111, 13700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,137]');
insert into test_mysql_restart_with_inc_mode values(138, 'name138', 148.111, 13800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,138]');
insert into test_mysql_restart_with_inc_mode values(139, 'name139', 149.111, 13900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,139]');
insert into test_mysql_restart_with_inc_mode values(140, 'name140', 150.111, 14000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,140]');
insert into test_mysql_restart_with_inc_mode values(141, 'name141', 151.111, 14100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,141]');
insert into test_mysql_restart_with_inc_mode values(142, 'name142', 152.111, 14200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,142]');
insert into test_mysql_restart_with_inc_mode values(143, 'name143', 153.111, 14300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,143]');
insert into test_mysql_restart_with_inc_mode values(144, 'name144', 154.111, 14400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,144]');
insert into test_mysql_restart_with_inc_mode values(145, 'name145', 155.111, 14500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,145]');
insert into test_mysql_restart_with_inc_mode values(146, 'name146', 156.111, 14600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,146]');
insert into test_mysql_restart_with_inc_mode values(147, 'name147', 157.111, 14700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,147]');
insert into test_mysql_restart_with_inc_mode values(148, 'name148', 158.111, 14800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,148]');
insert into test_mysql_restart_with_inc_mode values(149, 'name149', 159.111, 14900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,149]');
insert into test_mysql_restart_with_inc_mode values(150, 'name150', 160.111, 15000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,150]');
insert into test_mysql_restart_with_inc_mode values(151, 'name151', 161.111, 15100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,151]');
insert into test_mysql_restart_with_inc_mode values(152, 'name152', 162.111, 15200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,152]');
insert into test_mysql_restart_with_inc_mode values(153, 'name153', 163.111, 15300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,153]');
insert into test_mysql_restart_with_inc_mode values(154, 'name154', 164.111, 15400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,154]');
insert into test_mysql_restart_with_inc_mode values(155, 'name155', 165.111, 15500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,155]');
insert into test_mysql_restart_with_inc_mode values(156, 'name156', 166.111, 15600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,156]');
insert into test_mysql_restart_with_inc_mode values(157, 'name157', 167.111, 15700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,157]');
insert into test_mysql_restart_with_inc_mode values(158, 'name158', 168.111, 15800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,158]');
insert into test_mysql_restart_with_inc_mode values(159, 'name159', 169.111, 15900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,159]');
insert into test_mysql_restart_with_inc_mode values(160, 'name160', 170.111, 16000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,160]');
insert into test_mysql_restart_with_inc_mode values(161, 'name161', 171.111, 16100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,161]');
insert into test_mysql_restart_with_inc_mode values(162, 'name162', 172.111, 16200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,162]');
insert into test_mysql_restart_with_inc_mode values(163, 'name163', 173.111, 16300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,163]');
insert into test_mysql_restart_with_inc_mode values(164, 'name164', 174.111, 16400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,164]');
insert into test_mysql_restart_with_inc_mode values(165, 'name165', 175.111, 16500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,165]');
insert into test_mysql_restart_with_inc_mode values(166, 'name166', 176.111, 16600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,166]');
insert into test_mysql_restart_with_inc_mode values(167, 'name167', 177.111, 16700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,167]');
insert into test_mysql_restart_with_inc_mode values(168, 'name168', 178.111, 16800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,168]');
insert into test_mysql_restart_with_inc_mode values(169, 'name169', 179.111, 16900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,169]');
insert into test_mysql_restart_with_inc_mode values(170, 'name170', 180.111, 17000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,170]');
insert into test_mysql_restart_with_inc_mode values(171, 'name171', 181.111, 17100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,171]');
insert into test_mysql_restart_with_inc_mode values(172, 'name172', 182.111, 17200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,172]');
insert into test_mysql_restart_with_inc_mode values(173, 'name173', 183.111, 17300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,173]');
insert into test_mysql_restart_with_inc_mode values(174, 'name174', 184.111, 17400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,174]');
insert into test_mysql_restart_with_inc_mode values(175, 'name175', 185.111, 17500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,175]');
insert into test_mysql_restart_with_inc_mode values(176, 'name176', 186.111, 17600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,176]');
insert into test_mysql_restart_with_inc_mode values(177, 'name177', 187.111, 17700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,177]');
insert into test_mysql_restart_with_inc_mode values(178, 'name178', 188.111, 17800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,178]');
insert into test_mysql_restart_with_inc_mode values(179, 'name179', 189.111, 17900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,179]');
insert into test_mysql_restart_with_inc_mode values(180, 'name180', 190.111, 18000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,180]');
insert into test_mysql_restart_with_inc_mode values(181, 'name181', 191.111, 18100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,181]');
insert into test_mysql_restart_with_inc_mode values(182, 'name182', 192.111, 18200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,182]');
insert into test_mysql_restart_with_inc_mode values(183, 'name183', 193.111, 18300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,183]');
insert into test_mysql_restart_with_inc_mode values(184, 'name184', 194.111, 18400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,184]');
insert into test_mysql_restart_with_inc_mode values(185, 'name185', 195.111, 18500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,185]');
insert into test_mysql_restart_with_inc_mode values(186, 'name186', 196.111, 18600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,186]');
insert into test_mysql_restart_with_inc_mode values(187, 'name187', 197.111, 18700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,187]');
insert into test_mysql_restart_with_inc_mode values(188, 'name188', 198.111, 18800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,188]');
insert into test_mysql_restart_with_inc_mode values(189, 'name189', 199.111, 18900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,189]');
insert into test_mysql_restart_with_inc_mode values(190, 'name190', 200.111, 19000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,190]');
insert into test_mysql_restart_with_inc_mode values(191, 'name191', 201.111, 19100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,191]');
insert into test_mysql_restart_with_inc_mode values(192, 'name192', 202.111, 19200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,192]');
insert into test_mysql_restart_with_inc_mode values(193, 'name193', 203.111, 19300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,193]');
insert into test_mysql_restart_with_inc_mode values(194, 'name194', 204.111, 19400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,194]');
insert into test_mysql_restart_with_inc_mode values(195, 'name195', 205.111, 19500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,195]');
insert into test_mysql_restart_with_inc_mode values(196, 'name196', 206.111, 19600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,196]');
insert into test_mysql_restart_with_inc_mode values(197, 'name197', 207.111, 19700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,197]');
insert into test_mysql_restart_with_inc_mode values(198, 'name198', 208.111, 19800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,198]');
insert into test_mysql_restart_with_inc_mode values(199, 'name199', 209.111, 19900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,199]');
insert into test_mysql_restart_with_inc_mode values(200, 'name200', 210.111, 20000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,200]');
select count(*) from test_mysql_restart_with_inc_mode;
|
<gh_stars>1000+
UPDATE identity_recovery_tokens SET nid = (SELECT id FROM networks LIMIT 1); |
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50714
Source Host : 127.0.0.1:3306
Source Database : aojiaodajie
Target Server Type : MYSQL
Target Server Version : 50714
File Encoding : 65001
Date: 2018-04-20 16:45:23
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for tbl_ejiaomothersday_config
-- ----------------------------
DROP TABLE IF EXISTS `tbl_ejiaomothersday_config`;
CREATE TABLE `tbl_ejiaomothersday_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`praisefeild` varchar(10) NOT NULL COMMENT '奖项标识字段',
`praisename` varchar(20) NOT NULL COMMENT '奖项名称',
`min` varchar(100) NOT NULL COMMENT '最小角度',
`max` varchar(100) NOT NULL COMMENT '最大角度',
`praisecontent` text NOT NULL COMMENT '奖项内容',
`praisenumber` int(5) NOT NULL COMMENT '奖项库存',
`praiseimage` varchar(200) NOT NULL DEFAULT '' COMMENT '奖品图片',
`chance` int(10) NOT NULL DEFAULT '0' COMMENT '获奖几率',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tbl_ejiaomothersday_config
-- ----------------------------
INSERT INTO `tbl_ejiaomothersday_config` VALUES ('1', '', '250g阿胶', '', '', '250g阿胶', '0', '2018-04/S_5FoDyFRYV81bI5x-xgRFr07jXrghqL.png', '0');
INSERT INTO `tbl_ejiaomothersday_config` VALUES ('2', '', '500g阿胶', '', '', '500g阿胶', '0', '2018-04/vbzatfPlYP1Z5snl6UTXF3g-e9TA69dJ.png', '0');
INSERT INTO `tbl_ejiaomothersday_config` VALUES ('3', '', '阿胶糕礼品装', '', '', '同仁堂阿胶糕一盒', '3', '2018-04/fz97SmtdWCDhs5Sp8oLsJDjek2mUurLV.png', '5');
INSERT INTO `tbl_ejiaomothersday_config` VALUES ('4', '', '阿胶金丝枣', '', '', '同仁堂阿胶金丝枣一袋', '50', '2018-04/Pkm48QkfQw4MBKJ862LtcZCRQmKrVTag.png', '10');
INSERT INTO `tbl_ejiaomothersday_config` VALUES ('6', '', '谢谢参与', '', '', '谢谢参与', '-1', '', '85');
-- ----------------------------
-- Table structure for tbl_ejiaomothersday_prize_pool
-- ----------------------------
DROP TABLE IF EXISTS `tbl_ejiaomothersday_prize_pool`;
CREATE TABLE `tbl_ejiaomothersday_prize_pool` (
`pid` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '奖池ID',
`aid` tinyint(1) NOT NULL COMMENT '奖项',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态0未中奖,1已中奖',
`openid` varchar(32) NOT NULL,
`ip` varchar(20) NOT NULL,
`order` varchar(100) NOT NULL DEFAULT '',
`created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`result` text NOT NULL,
`type` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`pid`),
KEY `aid` (`aid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- ----------------------------
-- Table structure for tbl_ejiaomothersday_weixin_user
-- ----------------------------
DROP TABLE IF EXISTS `tbl_ejiaomothersday_weixin_user`;
CREATE TABLE `tbl_ejiaomothersday_weixin_user` (
`openid` varchar(32) NOT NULL DEFAULT '' COMMENT 'OPENID',
`authKey` varchar(100) NOT NULL DEFAULT '' COMMENT 'cookies认证',
`wx_username` varchar(30) NOT NULL DEFAULT '' COMMENT '昵称',
`wx_sex` tinyint(1) NOT NULL DEFAULT '0' COMMENT '性别',
`wx_country` varchar(30) NOT NULL DEFAULT '' COMMENT '国家',
`wx_province` varchar(30) NOT NULL DEFAULT '' COMMENT '省份',
`wx_city` varchar(30) NOT NULL DEFAULT '' COMMENT '城市',
`wx_avatar` text COMMENT '微信获取的头像链接',
`wx_subscribe` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否关注',
`wx_access_token` text,
`wx_expires` int(11) NOT NULL DEFAULT '0',
`ip` varchar(15) NOT NULL DEFAULT '0' COMMENT 'IP地址',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`realname` varchar(32) NOT NULL DEFAULT '' COMMENT '真实姓名',
`mobile` varchar(11) NOT NULL DEFAULT '' COMMENT '手机号',
`address` varchar(255) NOT NULL DEFAULT '' COMMENT '地址',
`d1_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '本日剩余次数',
`d1_pid` int(11) NOT NULL DEFAULT '0' COMMENT '奖项ID',
`d2_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '本日剩余次数',
`d2_pid` int(11) NOT NULL DEFAULT '0' COMMENT '奖项ID',
`d3_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '本日剩余次数',
`d3_pid` int(11) NOT NULL DEFAULT '0' COMMENT '奖项ID',
`d4_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '本日剩余次数',
`d4_pid` int(11) NOT NULL DEFAULT '0' COMMENT '奖项ID',
`d5_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '本日剩余次数',
`d5_pid` int(11) NOT NULL DEFAULT '0' COMMENT '奖项ID',
`d6_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '本日剩余次数',
`d6_pid` int(11) NOT NULL DEFAULT '0' COMMENT '奖项ID',
`d7_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '本日剩余次数',
`d7_pid` int(11) NOT NULL DEFAULT '0' COMMENT '奖项ID',
`extra` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`openid`),
UNIQUE KEY `openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户表'; |
<reponame>mitapirvuet/uppscience
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.10-log - MySQL Community Server (GPL)
-- Server OS: Win32
-- HeidiSQL Version: 9.3.0.4984
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping structure for table visconti db.student_education
CREATE TABLE IF NOT EXISTS `student_education` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Created on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`Last modified on` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`Trash` enum('Yes','No') DEFAULT NULL,
`Institution name` varchar(20) NOT NULL,
`Degree` int(11) NOT NULL,
`Degree details` varchar(20) NOT NULL,
`From` date NOT NULL,
`To` date NOT NULL,
`Details` text NOT NULL,
`Student` int(11) NOT NULL,
PRIMARY KEY (`ID`),
KEY `FK_student_education_degrees` (`Degree`),
KEY `FK_student_education_student` (`Student`),
CONSTRAINT `FK_student_education_degrees` FOREIGN KEY (`Degree`) REFERENCES `degrees` (`ID`),
CONSTRAINT `FK_student_education_student` FOREIGN KEY (`Student`) REFERENCES `student` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Student education entity holds data about educational history for students';
-- Dumping data for table visconti db.student_education: ~0 rows (approximately)
/*!40000 ALTER TABLE `student_education` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_education` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
SELECT t1.name as "<NAME>", t2.dept_name as "Department Name", t1.pay "Year pay"
FROM employee as t1
JOIN department as t2 on ( t1.department_id = t2.department_id )
;
|
-- MySQL dump 10.13 Distrib 5.6.25, for debian-linux-gnu (i686)
--
-- Host: localhost Database: eshop
-- ------------------------------------------------------
-- Server version 5.6.25-0ubuntu0.15.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `administrators`
--
DROP TABLE IF EXISTS `administrators`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `administrators` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(190) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
UNIQUE KEY `administrators_username_unique` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `administrators`
--
LOCK TABLES `administrators` WRITE;
/*!40000 ALTER TABLE `administrators` DISABLE KEYS */;
INSERT INTO `administrators` VALUES (1,'admin','$2y$10$vdkB2rWc.i.5H/2LKSyq3eWb81oy2J5hwTIVB.SUUPAxJEG9<PASSWORD>','DNPAdministrator',NULL,'2015-12-09 11:25:28','2015-12-09 11:25:28');
/*!40000 ALTER TABLE `administrators` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `categories`
--
DROP TABLE IF EXISTS `categories`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `categories` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`parent_id` int(11) NOT NULL,
`active` tinyint(1) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
UNIQUE KEY `categories_title_unique` (`title`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `categories`
--
LOCK TABLES `categories` WRITE;
/*!40000 ALTER TABLE `categories` DISABLE KEYS */;
INSERT INTO `categories` VALUES (1,'Root Category',0,1,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(3,'Бытовая техника',1,1,'2015-12-10 23:22:59','2015-12-10 23:22:59'),(4,'Пылесосы',3,1,'2015-12-10 23:23:13','2015-12-10 23:23:13'),(5,'Холодильники',3,1,'2015-12-10 23:23:26','2015-12-10 23:23:26'),(8,'Стиральные машины',3,1,'2015-12-11 14:38:24','2015-12-11 14:38:24'),(9,'Мультиварки',3,1,'2015-12-11 14:38:58','2015-12-11 14:38:58'),(10,'Компьютерная техника',1,1,'2015-12-11 14:39:24','2015-12-11 14:39:24'),(11,'Ноутбуки и аксессуары',10,1,'2015-12-11 14:39:34','2015-12-15 14:35:21'),(12,'Планшеты',10,1,'2015-12-11 14:39:40','2015-12-11 14:39:40'),(13,'Моноблоки',10,1,'2015-12-11 14:40:00','2015-12-11 14:40:00'),(14,'Ноутбуки',11,1,'2015-12-11 14:40:11','2015-12-11 14:40:11'),(15,'Аккумуляторы для ноутбуков',11,1,'2015-12-11 14:40:19','2015-12-11 14:40:19'),(16,'Сумки, рюкзаки и чехлы для ноутбуков',11,1,'2015-12-11 14:40:27','2015-12-11 14:40:27'),(17,'Мобильные телефоны',1,0,'2015-12-11 14:41:07','2015-12-15 09:01:59'),(18,'Телефоны и смартфоны',17,1,'2015-12-11 14:41:30','2015-12-11 14:41:30'),(20,'Аксессуары для телефонов',17,1,'2015-12-13 14:59:09','2015-12-13 14:59:09');
/*!40000 ALTER TABLE `categories` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `migrations`
--
DROP TABLE IF EXISTS `migrations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `migrations` (
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `migrations`
--
LOCK TABLES `migrations` WRITE;
/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
INSERT INTO `migrations` VALUES ('2014_10_12_000000_create_users_table',1),('2014_10_12_100000_create_password_resets_table',1),('2014_10_12_104748_create_administrators_table',1),('2015_11_18_141621_create_categories_table',2),('2015_11_23_152004_create_products_table',3),('2015_12_08_160401_create_order_statuses_table',4),('2015_11_27_003102_create_orders_table',5),('2015_12_08_155524_create_order_contents_table',6);
/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `order_contents`
--
DROP TABLE IF EXISTS `order_contents`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `order_contents` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`quantity` int(11) NOT NULL,
`price` int(11) NOT NULL,
`product_id` int(10) unsigned NOT NULL,
`order_id` int(10) unsigned NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `order_contents_product_id_foreign` (`product_id`),
KEY `order_contents_order_id_foreign` (`order_id`),
CONSTRAINT `order_contents_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`),
CONSTRAINT `order_contents_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `order_contents`
--
LOCK TABLES `order_contents` WRITE;
/*!40000 ALTER TABLE `order_contents` DISABLE KEYS */;
INSERT INTO `order_contents` VALUES (1,1,4298,4,1,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(2,1,13599,6,1,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(3,2,3699,9,1,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(4,1,7777,7,2,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(5,1,4298,4,3,'0000-00-00 00:00:00','0000-00-00 00:00:00');
/*!40000 ALTER TABLE `order_contents` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `order_statuses`
--
DROP TABLE IF EXISTS `order_statuses`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `order_statuses` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `order_statuses`
--
LOCK TABLES `order_statuses` WRITE;
/*!40000 ALTER TABLE `order_statuses` DISABLE KEYS */;
INSERT INTO `order_statuses` VALUES (1,'Ожидает обработку','0000-00-00 00:00:00','0000-00-00 00:00:00'),(2,'В доставке','0000-00-00 00:00:00','0000-00-00 00:00:00'),(3,'Завершен успешно','0000-00-00 00:00:00','0000-00-00 00:00:00'),(4,'Отменен','0000-00-00 00:00:00','0000-00-00 00:00:00');
/*!40000 ALTER TABLE `order_statuses` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `orders`
--
DROP TABLE IF EXISTS `orders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `orders` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`customer_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`sum_order` int(11) NOT NULL,
`delivery_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`comment` text COLLATE utf8_unicode_ci,
`order_status_id` int(10) unsigned NOT NULL DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `orders_order_status_id_foreign` (`order_status_id`),
CONSTRAINT `orders_order_status_id_foreign` FOREIGN KEY (`order_status_id`) REFERENCES `order_statuses` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `orders`
--
LOCK TABLES `orders` WRITE;
/*!40000 ALTER TABLE `orders` DISABLE KEYS */;
INSERT INTO `orders` VALUES (1,'<NAME>','<EMAIL>','050-123-45-67',25295,'Киев','Комментарий',1,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(2,'Petrov','<EMAIL>','38-067-987-65-43',7777,'Сумская, 28','',1,'0000-00-00 00:00:00','0000-00-00 00:00:00'),(3,'<NAME>','<EMAIL>','+38(077) 777-77-77',4298,'Харьков','',1,'0000-00-00 00:00:00','0000-00-00 00:00:00');
/*!40000 ALTER TABLE `orders` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `password_resets`
--
DROP TABLE IF EXISTS `password_resets`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
KEY `password_resets_email_index` (`email`),
KEY `password_resets_token_index` (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `password_resets`
--
LOCK TABLES `password_resets` WRITE;
/*!40000 ALTER TABLE `password_resets` DISABLE KEYS */;
/*!40000 ALTER TABLE `password_resets` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `products`
--
DROP TABLE IF EXISTS `products`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `products` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`description` text COLLATE utf8_unicode_ci,
`price` int(11) NOT NULL,
`image` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`active` tinyint(1) NOT NULL,
`product_rest` int(11) NOT NULL DEFAULT '0',
`category_id` int(10) unsigned NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
UNIQUE KEY `products_name_unique` (`name`),
UNIQUE KEY `products_slug_unique` (`slug`),
KEY `products_category_id_foreign` (`category_id`),
CONSTRAINT `products_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `products`
--
LOCK TABLES `products` WRITE;
/*!40000 ALTER TABLE `products` DISABLE KEYS */;
INSERT INTO `products` VALUES (3,'Стиральная машина Zanussi ZWSE680V ','zanussi-zwse680v','<p>Тип загрузки: Фронтальная;</p>\r\n\r\n<p>Цвет: Белый;</p>\r\n\r\n<p>Загрузка белья, кг: 5;</p>\r\n\r\n<p>Класс стирки: A;</p>\r\n\r\n<p>Класс потребления энергии: A++;</p>\r\n\r\n<p>Глубина, см: 38;<br />\r\n </p>\r\n',4699,'images/uploads/7da8fe0757b4ab0f8c0fe48602330571.jpg',1,10,8,'2015-12-11 14:48:40','2015-12-15 09:32:43'),(4,'Стиральная машина Indesit WISN 821 UA','indesit-wisn-821-ua','<p>Тип загрузки: Фронтальная;</p>\r\n\r\n<p>Цвет: Белый;</p>\r\n\r\n<p>Загрузка белья, кг: 5;</p>\r\n\r\n<p>Класс стирки: A;</p>\r\n\r\n<p>Класс потребления энергии: A+;</p>\r\n\r\n<p>Материал бака: Пластик;<br />\r\n </p>\r\n',4298,'images/uploads/a0930315dcc963f47079ebf51316f114.jpeg',1,7,8,'2015-12-11 14:50:38','2015-12-15 14:36:54'),(5,'Стиральная машина Gorenje W 7202/S ','gorenje-w-7202-s','<p>Цвет: Белый;</p>\r\n\r\n<p>Загрузка белья, кг: 7;</p>\r\n\r\n<p>Класс стирки: A;</p>\r\n\r\n<p>Класс потребления энергии: A++;</p>\r\n\r\n<p>Материал бака: Пластик;<br />\r\n </p>\r\n',6399,'images/uploads/c037954f145a325c64b27572e023141f.jpg',0,0,8,'2015-12-11 14:52:50','2015-12-14 13:31:57'),(6,'Холодильник SAMSUNG RL 48 RLBSW','samsung-rl-48-rlbsw','<p>ип холодильника: Двухкамерный;</p>\r\n\r\n<p>Расположение морозилки: Нижнее;</p>\r\n\r\n<p>Общий объем, л: 346; Высота, см: 192;</p>\r\n\r\n<p>Система охлаждения: No Frost;</p>\r\n\r\n<p>Класс энергопотребления: A+;<br />\r\n </p>\r\n',13599,'images/uploads/933165a96116a4f1c27792a6efac5eb7.jpg',1,9,5,'2015-12-11 14:54:57','2015-12-15 09:32:23'),(7,'Холодильник Indesit BIAA 13 P SI ','indesit-biaa-13-p-si','<p>Тип холодильника: Двухкамерный;</p>\r\n\r\n<p>Расположение морозилки: Нижнее;</p>\r\n\r\n<p>Общий объем, л: 334; Высота, см: 187;</p>\r\n\r\n<p>Система охлаждения: Капельная;</p>\r\n\r\n<p>Класс энергопотребления: A+;<br />\r\n </p>\r\n',7777,'images/uploads/ac80ddb2628954d575f6a8ab3f615a5f.jpg',1,5,5,'2015-12-11 14:56:46','2015-12-15 09:32:31'),(8,'Холодильник LG GC-B379SVQW','lg-gc-b379svqw','',12099,'images/uploads/cfa474ea0c17dced6beef9a256b0f7b4.jpg',0,0,5,'2015-12-11 14:58:34','2015-12-11 14:58:34'),(9,'Пылесос Zelmer Aquawelt 919.0 ST ','zelmer-919-0-st_3','<p>Гарантийный срок: 12 месяцев;</p>\r\n\r\n<p>Тип пылесоса: Моющий;</p>\r\n\r\n<p>Регулировка мощности: На корпусе;</p>\r\n\r\n<p>Питание: От сети 220В; Труба всасывания:</p>\r\n\r\n<p>Телескопическая; Турбощетка: Есть;<br />\r\n </p>\r\n',3699,'images/uploads/80298d20ea4d949fae79509e426e1be7.jpg',1,15,4,'2015-12-11 15:00:21','2015-12-14 13:25:05'),(10,'Ноутбук Asus X553 (R515MA-SX688B) Black','asus-x553-r515ma-sx688b-black','<p>Диагональ дисплея: 15,6";</p>\r\n\r\n<p>Дисплей: Глянцевый экран;</p>\r\n\r\n<p>Тип процессора: Intel Celeron N2840 (2.16 ГГц);</p>\r\n\r\n<p>Оперативная память: 2 Гб;</p>\r\n\r\n<p>Жесткий диск HDD: 500 Гб;</p>\r\n\r\n<p>Графический адаптер: Intel HD Graphics;<br />\r\n </p>\r\n',6999,'images/uploads/cfc3a1175eda8071bba56416856bea93.jpg',1,15,14,'2015-12-11 15:03:04','2015-12-14 13:25:08'),(11,'Моноблок Lenovo C20-30 (F0B2003JUA) ','lenovo-c20-30-f0b2003jua','<p>Диагональ дисплея: 19.5";</p>\r\n\r\n<p>Тип процессора: Двухъядерный Intel Pentium 3558U (1.7 ГГц);</p>\r\n\r\n<p>Оперативная память: 4 Гб;</p>\r\n\r\n<p>Жесткий диск: 500 Gb;</p>\r\n\r\n<p>Графический адаптер: Intel HD Graphics;</p>\r\n\r\n<p>Оптический привод: DVD Super Multi;<br />\r\n </p>\r\n',13199,'images/uploads/4e36c7eb689f90192b414a6d97f3d7e9.jpg',1,12,13,'2015-12-11 15:06:19','2015-12-14 13:11:13');
/*!40000 ALTER TABLE `products` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2015-12-15 18:27:33
|
<filename>db/migrations/20161007013953_AddGistUpdatesForeignKey.sql<gh_stars>0
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
ALTER TABLE gist_updates ADD CONSTRAINT gists FOREIGN KEY (gist) REFERENCES pipes (gist) MATCH FULL;
-- +goose Down
-- SQL section 'Down' is executed when this migration is rolled back
ALTER TABLE gist_updates DROP CONSTRAINT IF EXISTS gists;
|
SELECT Email
FROM (
SELECT Email,
COUNT(email) AS cnt
FROM Person
GROUP BY 1
) a
WHERE cnt > 1 |
-- =============================================
-- Author: HPCPC
-- Create date: 2/9/2017 11:21:50 AM
-- Description: Warning, this is auto-generated and might be over written. Do not edit.
-- =============================================
CREATE PROCEDURE [dbo].[AppResourceLinkSelect] @AppResourceLinkGuid UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT
*
FROM [dbo].[AppResourceLink]
WHERE ([AppResourceLinkGuid] = @AppResourceLinkGuid)
END |
<reponame>Dianmusfiroh/parfum
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 24, 2019 at 02:01 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `db_parfum`
--
-- --------------------------------------------------------
--
-- Table structure for table `t_parfum`
--
CREATE TABLE `t_parfum` (
`id_parfum` int(30) NOT NULL,
`merek` varchar(100) NOT NULL,
`gender` enum('wanita','laki-laki') NOT NULL,
`ukuran` varchar(100) NOT NULL,
`jenis` varchar(100) NOT NULL,
`kekuatan_aroma` varchar(100) NOT NULL,
`klarifikasi_aroma` varchar(100) NOT NULL,
`tahun` year(4) NOT NULL,
`harga` int(100) NOT NULL,
`stok` int(100) NOT NULL,
`nama_foto` varchar(500) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Error reading data for table db_parfum.t_parfum: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM `db_parfum`.`t_parfum`' at line 1
--
-- Indexes for dumped tables
--
--
-- Indexes for table `t_parfum`
--
ALTER TABLE `t_parfum`
ADD PRIMARY KEY (`id_parfum`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
create table LFDB.Aluno(
id_aluno number primary key,
nr_matricula varchar2(10),
nm_aluno varchar2(10)
); |
<reponame>lalifeier/vvgo
-- 暂存购物车
{
"cart": [
{
"sku_id": 1,
"count": 1,
"timestamp": 1527058983,
"selected": true
},
]
}
-- 用户购物车
CREATE TABLE `user_cart` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
`sku_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '商品sku_id',
`count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品数量',
`timestamp` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '加购时间',
`selected` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否选中',
PRIMARY KEY (`id`),
KEY `idx_user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户购物车表';
-- hash数据结构
-- 增加购物车商品
hset cart:user_id sku_id {count: 1, timestamp: 1527058983, selected: true}
-- 获取购物车所有商品(全选)
hgetall cart:user_id
-- 购物车商品数量
hlen cart:user_id
-- 删除商品
hdel cart:user_id sku_id
-- 增加商品
hincrby cart:user_id sku_id:num 1
hmset cart:user_id sku_id:num 1 sku_id:info {timestamp: 1527058983, selected: true}
|
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.25)
# Database: tutorial_crud_codeigniter
# Generation Time: 2019-05-24 06:30:07 +0000
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
# Dump of table pengguna
# ------------------------------------------------------------
DROP TABLE IF EXISTS `pengguna`;
CREATE TABLE `pengguna` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nama` varchar(50) NOT NULL,
`umur` int(3) NOT NULL,
`tanggal_lahir` datetime DEFAULT NULL,
`jenis_kelamin` varchar(10) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
LOCK TABLES `pengguna` WRITE;
/*!40000 ALTER TABLE `pengguna` DISABLE KEYS */;
INSERT INTO `pengguna` (`id`, `nama`, `umur`, `tanggal_lahir`, `jenis_kelamin`)
VALUES
(1,'<NAME>',26,'1993-06-03 00:00:00','Lelaki'),
(2,'Aditya',26,'1993-06-03 00:00:00','Lelaki'),
(3,'<NAME>',26,'1993-06-03 00:00:00','Lelaki'),
(4,'Ramdhoni',26,'1993-06-03 00:00:00','Lelaki'),
(5,'Ahmad',26,'1993-06-03 00:00:00','Lelaki'),
(6,'<NAME>',26,'1993-06-03 00:00:00','Lelaki'),
(7,'Sofia',26,'1993-06-03 00:00:00','Perempuan'),
(8,'Azzahra',26,'1993-06-03 00:00:00','Perempuan'),
(9,'<NAME>',26,'1993-06-03 00:00:00','Lelaki'),
(10,'<NAME>',26,'1993-06-03 00:00:00','Lelaki'),
(11,'<NAME>',26,'1993-06-03 00:00:00','Lelaki'),
(12,'<NAME>',26,'1993-06-03 00:00:00','Lelaki'),
(13,'<NAME>',26,'1993-06-03 00:00:00','Lelaki'),
(14,'Gerald',26,'1993-06-03 00:00:00','Lelaki'),
(15,'Spongebob',26,'1993-06-03 00:00:00','Lelaki');
/*!40000 ALTER TABLE `pengguna` ENABLE KEYS */;
UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.