🚀 Korea Tourism Agency - Complete implementation
✨ Features: - Modern tourism website with responsive design - AdminJS admin panel with image editor integration - PostgreSQL database with comprehensive schema - Docker containerization - Image upload and gallery management 🛠 Tech Stack: - Backend: Node.js + Express.js - Database: PostgreSQL 13+ - Frontend: HTML/CSS/JS with responsive design - Admin: AdminJS with custom components - Deployment: Docker + Docker Compose - Image Processing: Sharp with optimization 📱 Admin Features: - Routes/Tours management (city, mountain, fishing) - Guides profiles with specializations - Articles and blog system - Image editor with upload/gallery/URL options - User management and authentication - Responsive admin interface 🎨 Design: - Korean tourism focused branding - Mobile-first responsive design - Custom CSS with modern aesthetics - Image optimization and gallery - SEO-friendly structure 🔒 Security: - Helmet.js security headers - bcrypt password hashing - Input validation and sanitization - CORS protection - Environment variables
This commit is contained in:
51
database/check-tables.js
Normal file
51
database/check-tables.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import db from '../src/config/database.js';
|
||||
|
||||
async function checkTables() {
|
||||
try {
|
||||
console.log('🔍 Проверяем структуру таблиц...');
|
||||
|
||||
// Проверяем guides
|
||||
const guidesDesc = await db.query(`
|
||||
SELECT column_name, data_type
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'guides'
|
||||
ORDER BY ordinal_position
|
||||
`);
|
||||
|
||||
console.log('\n📋 Таблица guides:');
|
||||
guidesDesc.rows.forEach(row => {
|
||||
console.log(` - ${row.column_name}: ${row.data_type}`);
|
||||
});
|
||||
|
||||
// Проверяем articles
|
||||
const articlesDesc = await db.query(`
|
||||
SELECT column_name, data_type
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'articles'
|
||||
ORDER BY ordinal_position
|
||||
`);
|
||||
|
||||
console.log('\n📰 Таблица articles:');
|
||||
articlesDesc.rows.forEach(row => {
|
||||
console.log(` - ${row.column_name}: ${row.data_type}`);
|
||||
});
|
||||
|
||||
// Проверяем тип поля languages в guides
|
||||
const languagesType = await db.query(`
|
||||
SELECT data_type, column_default
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'guides' AND column_name = 'languages'
|
||||
`);
|
||||
|
||||
if (languagesType.rows.length > 0) {
|
||||
console.log(`\n🔤 Поле languages: ${languagesType.rows[0].data_type}`);
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.error('❌ Ошибка:', error.message);
|
||||
}
|
||||
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
checkTables();
|
||||
Reference in New Issue
Block a user