 -- Crate the prep_1 dynamic table
 CREATE TABLE qiita.prep_1 (
 	sample_id						varchar,
+	study_id						bigint,
 	BarcodeSequence					varchar,
 	LIBRARY_CONSTRUCTION_PROTOCOL	varchar,
 	LinkerPrimerSequence			varchar,

INSERT INTO qiita.analysis_filepath (analysis_id, filepath_id, data_type_id) VALUES (1, 14, 2), (1, 15, NULL);

-- Attach samples to analysis
INSERT INTO qiita.analysis_sample (analysis_id, processed_data_id, sample_id) VALUES (1,1,'SKB8.640193'), (1,1,'SKD8.640184'), (1,1,'SKB7.640196'), (1,1,'SKM9.640192'), (1,1,'SKM4.640180'), (2,1,'SKB8.640193'), (2,1,'SKD8.640184'), (2,1,'SKB7.640196'), (2,1,'SKM3.640197');

--Share analysis with shared user
INSERT INTO qiita.analysis_users (analysis_id, email) VALUES (1, 'shared@foo.bar');

	('SKD1.640179', 'winter', 'n', '66 sand, 16.3 silt, 17.7 clay', '410658', 0.15, '3483', 'soil metagenome', 0.178, 114, 15, 1.51, 7.1, 0, 'ENVO:Temperate grasslands, savannas, and shrubland biome', 'GAZ:United States of America', 6.8, 'SKD1', 4.32, 'Diesel bulk', 'ENVO:plant-associated habitat');

-- Add the common prep info for study 1
INSERT INTO qiita.common_prep_info (raw_data_id, sample_id, study_id, center_name, center_project_name, emp_status_id) VALUES
	(1, 'SKB8.640193', 1, 'ANL', NULL, 1),
	(1, 'SKD8.640184', 1, 'ANL', NULL, 1),
	(1, 'SKB7.640196', 1, 'ANL', NULL, 1),
	(1, 'SKM9.640192', 1, 'ANL', NULL, 1),
	(1, 'SKM4.640180', 1, 'ANL', NULL, 1),
	(1, 'SKM5.640177', 1, 'ANL', NULL, 1),
	(1, 'SKB5.640181', 1, 'ANL', NULL, 1),
	(1, 'SKD6.640190', 1, 'ANL', NULL, 1),
	(1, 'SKB2.640194', 1, 'ANL', NULL, 1),
	(1, 'SKD2.640178', 1, 'ANL', NULL, 1),
	(1, 'SKM7.640188', 1, 'ANL', NULL, 1),
	(1, 'SKB1.640202', 1, 'ANL', NULL, 1),
	(1, 'SKD1.640179', 1, 'ANL', NULL, 1),
	(1, 'SKD3.640198', 1, 'ANL', NULL, 1),
	(1, 'SKM8.640201', 1, 'ANL', NULL, 1),
	(1, 'SKM2.640199', 1, 'ANL', NULL, 1),
	(1, 'SKB9.640200', 1, 'ANL', NULL, 1),
	(1, 'SKD5.640186', 1, 'ANL', NULL, 1),
	(1, 'SKM3.640197', 1, 'ANL', NULL, 1),
	(1, 'SKD9.640182', 1, 'ANL', NULL, 1),
	(1, 'SKB4.640189', 1, 'ANL', NULL, 1),
	(1, 'SKD7.640191', 1, 'ANL', NULL, 1),
	(1, 'SKM6.640187', 1, 'ANL', NULL, 1),
	(1, 'SKD4.640185', 1, 'ANL', NULL, 1),
	(1, 'SKB3.640195', 1, 'ANL', NULL, 1),
	(1, 'SKB6.640176', 1, 'ANL', NULL, 1),
	(1, 'SKM1.640183', 1, 'ANL', NULL, 1);

-- Add raw data prep columns
INSERT INTO qiita.raw_data_prep_columns (raw_data_id, column_name, column_type) VALUES
	(1, 'sample_id', 'varchar'),
	(1, 'study_id', 'biginy'),
	(1, 'BarcodeSequence', 'varchar'),
	(1, 'LIBRARY_CONSTRUCTION_PROTOCOL', 'varchar'),
	(1, 'LinkerPrimerSequence', 'varchar'),
